From c47c79c3dcf9c3a0a7f2fe95cdde535c224e8e60 Mon Sep 17 00:00:00 2001 From: David Aparicio Date: Thu, 29 Jan 2026 09:33:02 +0100 Subject: [PATCH] Enables deployment strategy configuration within the Helm chart. --- pkg/helm/README.md | 3 +++ pkg/helm/templates/deployment.yaml | 9 +++++++++ pkg/helm/values.yaml | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/pkg/helm/README.md b/pkg/helm/README.md index 4c7f3e074..41ec0cf6c 100644 --- a/pkg/helm/README.md +++ b/pkg/helm/README.md @@ -40,3 +40,6 @@ The chart should dump its version and appVersion in the Chart.yaml file every re | `ingress.enabled` | Ingress resource creation | `false` | | `ingress.hostname` | Ingress resource hostname | `"pgadmin4.local"` | | `ingress.tlsSecret` | Ingress tls secret name | `""` | +| `strategy.type` | Deployment strategy type (RollingUpdate or Recreate) | Kubernetes default (RollingUpdate) | +| `strategy.rollingUpdate.maxSurge` | Maximum number of pods that can be created over the desired replicas | Kubernetes default (25%) | +| `strategy.rollingUpdate.maxUnavailable` | Maximum number of pods that can be unavailable during the update | Kubernetes default (25%) | diff --git a/pkg/helm/templates/deployment.yaml b/pkg/helm/templates/deployment.yaml index d2dbd9e8f..befb55dd6 100644 --- a/pkg/helm/templates/deployment.yaml +++ b/pkg/helm/templates/deployment.yaml @@ -10,6 +10,15 @@ metadata: {{- end }} spec: replicas: {{ .Values.replicas }} + {{- if .Values.strategy }} + strategy: + type: {{ .Values.strategy.type }} + {{- if and (eq .Values.strategy.type "RollingUpdate") .Values.strategy.rollingUpdate }} + rollingUpdate: + maxSurge: {{ .Values.strategy.rollingUpdate.maxSurge }} + maxUnavailable: {{ .Values.strategy.rollingUpdate.maxUnavailable }} + {{- end }} + {{- end }} selector: matchLabels: app: {{ default "pgadmin4" .Values.commonLabels.app }} diff --git a/pkg/helm/values.yaml b/pkg/helm/values.yaml index 873841480..8d844af6c 100644 --- a/pkg/helm/values.yaml +++ b/pkg/helm/values.yaml @@ -25,6 +25,12 @@ extraDeploy: [] replicas: 1 +# strategy: +# type: RollingUpdate +# rollingUpdate: +# maxSurge: 25% +# maxUnavailable: 25% + containerPort: 5050 disablePostfix: true enableServiceLinks: false