mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +00:00
commit
df9ad4d7d2
@ -282,7 +282,7 @@ var ValidateClusterName = apimachineryvalidation.ValidateClusterName
|
|||||||
// (where it should be) and this file.
|
// (where it should be) and this file.
|
||||||
var ValidateClassName = apimachineryvalidation.NameIsDNSSubdomain
|
var ValidateClassName = apimachineryvalidation.NameIsDNSSubdomain
|
||||||
|
|
||||||
// ValidatePiorityClassName can be used to check whether the given priority
|
// ValidatePriorityClassName can be used to check whether the given priority
|
||||||
// class name is valid.
|
// class name is valid.
|
||||||
var ValidatePriorityClassName = apimachineryvalidation.NameIsDNSSubdomain
|
var ValidatePriorityClassName = apimachineryvalidation.NameIsDNSSubdomain
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ func IsCertificateRequestApproved(csr *certificates.CertificateSigningRequest) b
|
|||||||
return approved && !denied
|
return approved && !denied
|
||||||
}
|
}
|
||||||
|
|
||||||
// HasCondition returns true if the csr contains a condition of the specified type with a status that is set to True or is empty
|
// HasTrueCondition returns true if the csr contains a condition of the specified type with a status that is set to True or is empty
|
||||||
func HasTrueCondition(csr *certificates.CertificateSigningRequest, conditionType certificates.RequestConditionType) bool {
|
func HasTrueCondition(csr *certificates.CertificateSigningRequest, conditionType certificates.RequestConditionType) bool {
|
||||||
for _, c := range csr.Status.Conditions {
|
for _, c := range csr.Status.Conditions {
|
||||||
if c.Type == conditionType && (len(c.Status) == 0 || c.Status == v1.ConditionTrue) {
|
if c.Type == conditionType && (len(c.Status) == 0 || c.Status == v1.ConditionTrue) {
|
||||||
|
@ -206,7 +206,7 @@ func NewPod(uid, name string) *v1.Pod {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewPod returns a test pod object
|
// NewPodWithVolume returns a test pod object
|
||||||
func NewPodWithVolume(podName, volumeName, nodeName string) *v1.Pod {
|
func NewPodWithVolume(podName, volumeName, nodeName string) *v1.Pod {
|
||||||
return &v1.Pod{
|
return &v1.Pod{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
|
@ -14,6 +14,6 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// generated package is the destination for all generated files. Not all generated files are currently use this package
|
// Package generated is the destination for all generated files. Not all generated files are currently use this package
|
||||||
// but the plan is to move as much of them as possible to this package.
|
// but the plan is to move as much of them as possible to this package.
|
||||||
package generated
|
package generated
|
||||||
|
Loading…
Reference in New Issue
Block a user