Merge pull request #37653 from foxish/new-rel2

Automatic merge from submit-queue

Update validation message.

Fixes validation message when patching a StatefulSet
This commit is contained in:
Kubernetes Submit Queue 2016-11-30 19:29:13 -08:00 committed by GitHub
commit 3415885572

View File

@ -111,7 +111,7 @@ func ValidateStatefulSetUpdate(statefulSet, oldStatefulSet *apps.StatefulSet) fi
statefulSet.Spec.Template.Spec.Containers = oldStatefulSet.Spec.Template.Spec.Containers
if !reflect.DeepEqual(statefulSet.Spec, oldStatefulSet.Spec) {
allErrs = append(allErrs, field.Forbidden(field.NewPath("spec"), "updates to statefulset spec for fields other than 'replicas' are forbidden."))
allErrs = append(allErrs, field.Forbidden(field.NewPath("spec"), "updates to statefulset spec for fields other than 'replicas' and 'containers' are forbidden."))
}
statefulSet.Spec.Replicas = restoreReplicas
statefulSet.Spec.Template.Spec.Containers = restoreContainers