Skip to content

Commit c47c79c

Browse files
Enables deployment strategy configuration within the Helm chart.
1 parent c45502d commit c47c79c

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

pkg/helm/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,6 @@ The chart should dump its version and appVersion in the Chart.yaml file every re
4040
| `ingress.enabled` | Ingress resource creation | `false` |
4141
| `ingress.hostname` | Ingress resource hostname | `"pgadmin4.local"` |
4242
| `ingress.tlsSecret` | Ingress tls secret name | `""` |
43+
| `strategy.type` | Deployment strategy type (RollingUpdate or Recreate) | Kubernetes default (RollingUpdate) |
44+
| `strategy.rollingUpdate.maxSurge` | Maximum number of pods that can be created over the desired replicas | Kubernetes default (25%) |
45+
| `strategy.rollingUpdate.maxUnavailable` | Maximum number of pods that can be unavailable during the update | Kubernetes default (25%) |

pkg/helm/templates/deployment.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ metadata:
1010
{{- end }}
1111
spec:
1212
replicas: {{ .Values.replicas }}
13+
{{- if .Values.strategy }}
14+
strategy:
15+
type: {{ .Values.strategy.type }}
16+
{{- if and (eq .Values.strategy.type "RollingUpdate") .Values.strategy.rollingUpdate }}
17+
rollingUpdate:
18+
maxSurge: {{ .Values.strategy.rollingUpdate.maxSurge }}
19+
maxUnavailable: {{ .Values.strategy.rollingUpdate.maxUnavailable }}
20+
{{- end }}
21+
{{- end }}
1322
selector:
1423
matchLabels:
1524
app: {{ default "pgadmin4" .Values.commonLabels.app }}

pkg/helm/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ extraDeploy: []
2525

2626
replicas: 1
2727

28+
# strategy:
29+
# type: RollingUpdate
30+
# rollingUpdate:
31+
# maxSurge: 25%
32+
# maxUnavailable: 25%
33+
2834
containerPort: 5050
2935
disablePostfix: true
3036
enableServiceLinks: false

0 commit comments

Comments
 (0)