Fixes from review, updated tests cases

This commit is contained in:
Sreeram Venkitesh
2024-11-07 11:02:11 +05:30
parent 7d1d7182f3
commit 385d2b198c
2 changed files with 84 additions and 101 deletions

View File

@@ -5515,10 +5515,8 @@ func ValidatePodResize(newPod, oldPod *core.Pod, opts PodValidationOptions) fiel
allErrs = append(allErrs, field.Invalid(specPath, newPod.Status.QOSClass, "Pod QOS Class may not change as a result of resizing"))
}
isPodResizeRequestValid := isPodResizeRequestSupported(*oldPod)
if !isPodResizeRequestValid {
allErrs = append(allErrs, field.Forbidden(specPath, "Pod running on node without InPlacePodVerticalScaling feature gate enabled may not be updated"))
if !isPodResizeRequestSupported(*oldPod) {
allErrs = append(allErrs, field.Forbidden(specPath, "Pod running on node without support for resize"))
}
// Ensure that only CPU and memory resources are mutable.