mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-09 14:02:56 +09:00
fix(vertical-pod-autoscaler): replace deprecated updateMode Auto with Recreate
VPA 1.4 deprecated updateMode Auto as an alias for Recreate that will be removed in a future API version. The vpa-for-vpa VerticalPodAutoscalers still used Auto; switch them to the explicit Recreate (behavior-identical today) and pin it in helm-unittest so the deprecated value cannot creep back. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Aleksei Sviridkin <f@lex.la>
This commit is contained in:
2 files changed
+17
-2
No files matched your search
@@ -69,7 +69,7 @@ spec:
|
||||
kind: Deployment
|
||||
name: {{ dig "vertical-pod-autoscaler" "nameOverride" "" .Values.AsMap | default "vertical-pod-autoscaler" | trunc 63 | trimSuffix "-" }}-recommender
|
||||
updatePolicy:
|
||||
updateMode: Auto
|
||||
updateMode: Recreate
|
||||
---
|
||||
apiVersion: autoscaling.k8s.io/v1
|
||||
kind: VerticalPodAutoscaler
|
||||
@@ -82,5 +82,5 @@ spec:
|
||||
kind: Deployment
|
||||
name: vpa-for-vpa-recommender
|
||||
updatePolicy:
|
||||
updateMode: Auto
|
||||
updateMode: Recreate
|
||||
{{- end }}
|
||||
@@ -28,3 +28,18 @@ tests:
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 0
|
||||
|
||||
# updateMode Auto is deprecated since VPA 1.4 (an alias for Recreate that will
|
||||
# be removed in a future API version). Pin the vpa-for-vpa
|
||||
# VerticalPodAutoscalers to the explicit, non-deprecated Recreate so the bump
|
||||
# does not leave a deprecated value behind.
|
||||
- it: pins the vpa-for-vpa VerticalPodAutoscalers to updateMode Recreate
|
||||
template: templates/vpa-for-vpa.yaml
|
||||
documentSelector:
|
||||
path: kind
|
||||
value: VerticalPodAutoscaler
|
||||
matchMany: true
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.updatePolicy.updateMode
|
||||
value: Recreate
|
||||
Reference in new issue
Block a user