From 4dce4d652a937ddbb2fb39f68764962dd46c39b4 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 22 Nov 2025 19:51:29 -0500 Subject: [PATCH] fix: ensure keda usage does not cause jank in scaling deployments If the values set by keda do not match the current deployment replicas value, the deployment object may be scaled in unexpected ways during a helm release. This change ensures keda will continue to manage that value correctly without the deployment object setting it back to something else. --- plugins/scheduler-k3s/templates/chart/deployment.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/scheduler-k3s/templates/chart/deployment.yaml b/plugins/scheduler-k3s/templates/chart/deployment.yaml index 10455a329..444dfaf0d 100644 --- a/plugins/scheduler-k3s/templates/chart/deployment.yaml +++ b/plugins/scheduler-k3s/templates/chart/deployment.yaml @@ -30,7 +30,9 @@ metadata: name: {{ $.Values.global.app_name }}-{{ $processName }} namespace: {{ $.Values.global.namespace }} spec: + {{- if not (and $config.autoscaling (and $config.autoscaling.enabled (eq $config.autoscaling.type "keda"))) }} replicas: {{ $config.replicas }} + {{- end }} revisionHistoryLimit: 5 selector: matchLabels: