Skip to content

Commit 454ca9a

Browse files
committed
fix
Signed-off-by: Sinelnikov Michail <mikhail.sinelnikov@flant.com>
1 parent 75411b0 commit 454ca9a

File tree

1 file changed

+4
-4
lines changed
  • pkg/linters/templates/rules

1 file changed

+4
-4
lines changed

pkg/linters/templates/rules/vpa.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,6 @@ func parseVPAResourcePolicyContainers(vpaObject storage.StoreObject, errorList *
145145
}
146146

147147
updateMode := *v.Spec.UpdatePolicy.UpdateMode
148-
if updateMode == UpdateModeAuto {
149-
errorListObj.Errorf("VPA updateMode cannot be 'Auto'")
150-
return updateMode, containers, false
151-
}
152148
if updateMode == UpdateModeOff {
153149
return updateMode, containers, true
154150
}
@@ -159,6 +155,10 @@ func parseVPAResourcePolicyContainers(vpaObject storage.StoreObject, errorList *
159155
return updateMode, containers, false
160156
}
161157

158+
if updateMode == UpdateModeAuto {
159+
errorListObj.Errorf("VPA updateMode cannot be 'Auto'")
160+
}
161+
162162
for _, cp := range v.Spec.ResourcePolicy.ContainerPolicies {
163163
if cp.MinAllowed.Cpu().IsZero() {
164164
errorListObj.Errorf("No VPA specs minAllowed.cpu is found for container %s", cp.ContainerName)

0 commit comments

Comments
 (0)