Merge pull request #132548 from gavinkflam/130656-fix-duplicate-validations-2

bug: Remove duplicate DaemonSet update validations
This commit is contained in:
Kubernetes Prow Robot
2025-07-15 12:06:30 -07:00
committed by GitHub
2 changed files with 2 additions and 7 deletions

View File

@@ -144,10 +144,7 @@ func (daemonSetStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Ob
opts := pod.GetValidationOptionsFromPodTemplate(&newDaemonSet.Spec.Template, &oldDaemonSet.Spec.Template)
opts.AllowInvalidLabelValueInSelector = opts.AllowInvalidLabelValueInSelector || metav1validation.LabelSelectorHasInvalidLabelValue(oldDaemonSet.Spec.Selector)
allErrs := validation.ValidateDaemonSet(obj.(*apps.DaemonSet), opts)
allErrs = append(allErrs, validation.ValidateDaemonSetUpdate(newDaemonSet, oldDaemonSet, opts)...)
return allErrs
return validation.ValidateDaemonSetUpdate(newDaemonSet, oldDaemonSet, opts)
}
// WarningsOnUpdate returns warnings for the given update.

View File

@@ -142,9 +142,7 @@ func (rsStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) f
oldReplicaSet := old.(*apps.ReplicaSet)
opts := pod.GetValidationOptionsFromPodTemplate(&newReplicaSet.Spec.Template, &oldReplicaSet.Spec.Template)
allErrs := appsvalidation.ValidateReplicaSetUpdate(newReplicaSet, oldReplicaSet, opts)
return allErrs
return appsvalidation.ValidateReplicaSetUpdate(newReplicaSet, oldReplicaSet, opts)
}
// WarningsOnUpdate returns warnings for the given update.