Skip to content

Commit 046260f

Browse files
siryurlukasmetzner
andauthored
feat(helm): allow customizing chart deployment strategy (#1190)
This pull request introduces support for customizing the deployment strategy in the Helm chart. The main enhancement allows users to specify deployment strategies, such as `Replace`, allowing an existing Pod to be destroyed before the new one is allocated. * Added support for specifying a custom deployment `strategy` in the `deployment.yaml` template, which will use the values provided in `.Values.strategy`. Fixes #1189 --------- Co-authored-by: Lukas Metzner <lukas.metzner@hetzner-cloud.de>
1 parent 2524313 commit 046260f

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

chart/templates/deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ metadata:
55
name: {{ include "hcloud-cloud-controller-manager.name" . }}
66
namespace: {{ .Release.Namespace }}
77
spec:
8+
{{- with .Values.strategy }}
9+
strategy:
10+
{{- toYaml . | nindent 4 }}
11+
{{- end }}
812
replicas: {{ .Values.replicaCount }}
913
revisionHistoryLimit: 2
1014
selector:

chart/values.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,14 @@ selectorLabels:
124124
app.kubernetes.io/name: '{{ include "hcloud-cloud-controller-manager.name" $ }}'
125125
app.kubernetes.io/instance: "{{ $.Release.Name }}"
126126

127+
# Deployment strategy for the hccm Pod.
128+
# See https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
129+
strategy: {}
130+
# type: RollingUpdate
131+
# rollingUpdate:
132+
# maxSurge: 1
133+
# maxUnavailable: 1
134+
127135
additionalTolerations: []
128136

129137
# nodeSelector:

0 commit comments

Comments
 (0)