Skip to content

Commit 410ab89

Browse files
author
johnstarx
committed
Allow users to choose which volumeMounts the initContainers have
1 parent 244a6fb commit 410ab89

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

charts/docker-mailserver/templates/deployment.yaml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -85,22 +85,11 @@ spec:
8585
{{- toYaml . | nindent 8 }}
8686
{{- end }}
8787

88-
{{- with .Values.deployment.initContainers }}
88+
{{- if .Values.deployment.initContainers }}
8989
initContainers:
90-
{{- range . }}
91-
- name: {{ .name }}
92-
image: {{ .image }}
93-
{{- with .command }}
94-
command: {{ toYaml . | nindent 10 }}
95-
{{- end }}
96-
{{- with .args }}
97-
args: {{ toYaml . | nindent 10 }}
98-
{{- end }}
99-
{{- with $.Values.deployment.extraVolumeMounts }}
100-
volumeMounts:
101-
{{- toYaml . | nindent 12 }}
102-
{{- end }}
103-
{{- end }}
90+
{{- with .Values.deployment.initContainers }}
91+
{{- toYaml . | nindent 8 }}
92+
{{- end }}
10493
{{- end }}
10594

10695
containers:

charts/docker-mailserver/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,9 @@ deployment:
279279
# command: [sh, -c]
280280
# args:
281281
# - echo "Hello, world!" > /mnt/extra-storage/test
282+
# volumeMounts:
283+
# - name: extra-storage
284+
# mountPath: /mnt/extra-storage
282285

283286
## Optionally specify a list of extra mounts to add (normally used with extraVolumes)
284287
extraVolumeMounts: []

0 commit comments

Comments
 (0)