File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -326,6 +326,11 @@ func MachineDeploymentTopologiesAreValidAndDefinedInClusterClass(desired *cluste
326
326
}
327
327
328
328
// The Name must also be a valid label value, because it is used in some label values.
329
+ //
330
+ // NOTE This check always returns true in practice, because OpenAPI validation in the
331
+ // Cluster CRD ensures that md.Name is <= 63 characters, and the IsDNS1123Subdomain check
332
+ // accepts a smaller set of characters than IsValidLabelValue. We keep this check to be able
333
+ // to unit test this function.
329
334
if errs := validation .IsValidLabelValue (md .Name ); len (errs ) != 0 {
330
335
for _ , err := range errs {
331
336
allErrs = append (
@@ -406,6 +411,11 @@ func MachinePoolTopologiesAreValidAndDefinedInClusterClass(desired *clusterv1.Cl
406
411
}
407
412
408
413
// The Name must also be a valid label value, because it is used in some label values.
414
+ //
415
+ // NOTE This check always returns true in practice, because OpenAPI validation in the
416
+ // Cluster CRD ensures that md.Name is <= 63 characters, and the IsDNS1123Subdomain check
417
+ // accepts a smaller set of characters than IsValidLabelValue. We keep this check to be able
418
+ // to unit test this function.
409
419
if errs := validation .IsValidLabelValue (mp .Name ); len (errs ) != 0 {
410
420
for _ , err := range errs {
411
421
allErrs = append (
You can’t perform that action at this time.
0 commit comments