From 3e6eb9bcf4ffd724a6f9c4b4c8f9cebfa374a6ec Mon Sep 17 00:00:00 2001 From: Aleksei Sviridkin Date: Mon, 22 Jun 2026 19:57:00 +0300 Subject: [PATCH] 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 Signed-off-by: Aleksei Sviridkin --- .../templates/vpa-for-vpa.yaml | 4 ++-- .../vertical-pod-autoscaler/tests/vpa_test.yaml | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/packages/system/vertical-pod-autoscaler/templates/vpa-for-vpa.yaml b/packages/system/vertical-pod-autoscaler/templates/vpa-for-vpa.yaml index 73df18b0d..04118e71f 100644 --- a/packages/system/vertical-pod-autoscaler/templates/vpa-for-vpa.yaml +++ b/packages/system/vertical-pod-autoscaler/templates/vpa-for-vpa.yaml @@ -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 }} diff --git a/packages/system/vertical-pod-autoscaler/tests/vpa_test.yaml b/packages/system/vertical-pod-autoscaler/tests/vpa_test.yaml index baabe393f..b2e50905d 100644 --- a/packages/system/vertical-pod-autoscaler/tests/vpa_test.yaml +++ b/packages/system/vertical-pod-autoscaler/tests/vpa_test.yaml @@ -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