mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-17 11:28:58 +00:00
Merge pull request #132548 from gavinkflam/130656-fix-duplicate-validations-2
bug: Remove duplicate DaemonSet update validations
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user