Bugfix: Fix ordering of ValidateObjectMetaUpdate method arguments for PodTemplate validation

parent f9f5677b
...@@ -3503,7 +3503,7 @@ func ValidatePodTemplate(pod *core.PodTemplate) field.ErrorList { ...@@ -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 // ValidatePodTemplateUpdate tests to see if the update is legal for an end user to make. newPod is updated with fields
// that cannot be changed. // that cannot be changed.
func ValidatePodTemplateUpdate(newPod, oldPod *core.PodTemplate) field.ErrorList { 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"))...) allErrs = append(allErrs, ValidatePodTemplateSpec(&newPod.Template, field.NewPath("template"))...)
return allErrs return allErrs
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment