@@ -40,9 +40,6 @@ var BannedOwners = map[schema.GroupVersionKind]struct{}{
40
40
{Group : "" , Version : "v1" , Kind : "Event" }: {},
41
41
}
42
42
43
- // ValidateZZZ_DeprecatedClusterName can be used to check whether the given cluster name is valid.
44
- var ValidateZZZ_DeprecatedClusterName = NameIsDNS1035Label
45
-
46
43
// ValidateAnnotations validates that a set of annotations are correctly defined.
47
44
func ValidateAnnotations (annotations map [string ]string , fldPath * field.Path ) field.ErrorList {
48
45
allErrs := field.ErrorList {}
@@ -184,11 +181,6 @@ func ValidateObjectMetaAccessor(meta metav1.Object, requiresNamespace bool, name
184
181
allErrs = append (allErrs , field .Forbidden (fldPath .Child ("namespace" ), "not allowed on this type" ))
185
182
}
186
183
}
187
- if len (meta .GetZZZ_DeprecatedClusterName ()) != 0 {
188
- for _ , msg := range ValidateZZZ_DeprecatedClusterName (meta .GetZZZ_DeprecatedClusterName (), false ) {
189
- allErrs = append (allErrs , field .Invalid (fldPath .Child ("clusterName" ), meta .GetZZZ_DeprecatedClusterName (), msg ))
190
- }
191
- }
192
184
193
185
allErrs = append (allErrs , ValidateNonnegativeField (meta .GetGeneration (), fldPath .Child ("generation" ))... )
194
186
allErrs = append (allErrs , v1validation .ValidateLabels (meta .GetLabels (), fldPath .Child ("labels" ))... )
@@ -261,7 +253,6 @@ func ValidateObjectMetaAccessorUpdate(newMeta, oldMeta metav1.Object, fldPath *f
261
253
allErrs = append (allErrs , ValidateImmutableField (newMeta .GetCreationTimestamp (), oldMeta .GetCreationTimestamp (), fldPath .Child ("creationTimestamp" ))... )
262
254
allErrs = append (allErrs , ValidateImmutableField (newMeta .GetDeletionTimestamp (), oldMeta .GetDeletionTimestamp (), fldPath .Child ("deletionTimestamp" ))... )
263
255
allErrs = append (allErrs , ValidateImmutableField (newMeta .GetDeletionGracePeriodSeconds (), oldMeta .GetDeletionGracePeriodSeconds (), fldPath .Child ("deletionGracePeriodSeconds" ))... )
264
- allErrs = append (allErrs , ValidateImmutableField (newMeta .GetZZZ_DeprecatedClusterName (), oldMeta .GetZZZ_DeprecatedClusterName (), fldPath .Child ("clusterName" ))... )
265
256
266
257
allErrs = append (allErrs , v1validation .ValidateLabels (newMeta .GetLabels (), fldPath .Child ("labels" ))... )
267
258
allErrs = append (allErrs , ValidateAnnotations (newMeta .GetAnnotations (), fldPath .Child ("annotations" ))... )
0 commit comments