Bugfix: Fix ordering of ValidateObjectMetaUpdate method arguments for PodTemplate validation

pull/6/head
Nail Islamov 2018-03-01 18:47:34 +11:00
parent f9f5677b3e
commit 0d36ab2f39
No known key found for this signature in database
GPG Key ID: 36245154B2536826
1 changed files with 1 additions and 1 deletions

View File

@ -3503,7 +3503,7 @@ func ValidatePodTemplate(pod *core.PodTemplate) field.ErrorList {
// ValidatePodTemplateUpdate tests to see if the update is legal for an end user to make. newPod is updated with fields
// that cannot be changed.
func ValidatePodTemplateUpdate(newPod, oldPod *core.PodTemplate) field.ErrorList {
allErrs := ValidateObjectMetaUpdate(&oldPod.ObjectMeta, &newPod.ObjectMeta, field.NewPath("metadata"))
allErrs := ValidateObjectMetaUpdate(&newPod.ObjectMeta, &oldPod.ObjectMeta, field.NewPath("metadata"))
allErrs = append(allErrs, ValidatePodTemplateSpec(&newPod.Template, field.NewPath("template"))...)
return allErrs
}