mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Bugfix: Fix ordering of ValidateObjectMetaUpdate method arguments for PodTemplate validation
This commit is contained in:
parent
f9f5677b3e
commit
0d36ab2f39
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user