From f48e020fc22a71a6331ccfd7d66726d956a8a378 Mon Sep 17 00:00:00 2001 From: LPW Date: Tue, 30 Dec 2025 16:10:47 -0500 Subject: [PATCH] Make rolling update strategies configurable for web and worker deployments in Helm templates (#522) Co-authored-by: Josh Waldrep --- charts/sure/templates/web-deployment.yaml | 9 +++++++-- charts/sure/templates/worker-deployment.yaml | 12 +++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/charts/sure/templates/web-deployment.yaml b/charts/sure/templates/web-deployment.yaml index 3c2cb2654..326b7e6c5 100644 --- a/charts/sure/templates/web-deployment.yaml +++ b/charts/sure/templates/web-deployment.yaml @@ -10,8 +10,13 @@ spec: strategy: type: RollingUpdate rollingUpdate: - maxUnavailable: 0 - maxSurge: 25% + {{- if and .Values.web.strategy .Values.web.strategy.rollingUpdate }} + maxUnavailable: {{ .Values.web.strategy.rollingUpdate.maxUnavailable | default 1 }} + maxSurge: {{ .Values.web.strategy.rollingUpdate.maxSurge | default 0 }} + {{- else }} + maxUnavailable: 1 + maxSurge: 0 + {{- end }} selector: matchLabels: app.kubernetes.io/component: web diff --git a/charts/sure/templates/worker-deployment.yaml b/charts/sure/templates/worker-deployment.yaml index 15c38194e..a358e28b6 100644 --- a/charts/sure/templates/worker-deployment.yaml +++ b/charts/sure/templates/worker-deployment.yaml @@ -6,7 +6,17 @@ metadata: {{- include "sure.labels" . | nindent 4 }} spec: replicas: {{ .Values.worker.replicas }} - revisionHistoryLimit: 2 + revisionHistoryLimit: {{ .Values.worker.revisionHistoryLimit | default 2 }} + strategy: + type: RollingUpdate + rollingUpdate: + {{- if and .Values.worker.strategy .Values.worker.strategy.rollingUpdate }} + maxUnavailable: {{ .Values.worker.strategy.rollingUpdate.maxUnavailable | default 1 }} + maxSurge: {{ .Values.worker.strategy.rollingUpdate.maxSurge | default 0 }} + {{- else }} + maxUnavailable: 1 + maxSurge: 0 + {{- end }} selector: matchLabels: app.kubernetes.io/component: worker