Skip to content

Commit

Permalink
Allow users to choose which volumeMounts the initContainers have
Browse files Browse the repository at this point in the history
  • Loading branch information
johnstarx committed Jul 6, 2024
1 parent 244a6fb commit 410ab89
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
19 changes: 4 additions & 15 deletions charts/docker-mailserver/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,22 +85,11 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}

{{- with .Values.deployment.initContainers }}
{{- if .Values.deployment.initContainers }}
initContainers:
{{- range . }}
- name: {{ .name }}
image: {{ .image }}
{{- with .command }}
command: {{ toYaml . | nindent 10 }}
{{- end }}
{{- with .args }}
args: {{ toYaml . | nindent 10 }}
{{- end }}
{{- with $.Values.deployment.extraVolumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
{{- with .Values.deployment.initContainers }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}

containers:
Expand Down
3 changes: 3 additions & 0 deletions charts/docker-mailserver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,9 @@ deployment:
# command: [sh, -c]
# args:
# - echo "Hello, world!" > /mnt/extra-storage/test
# volumeMounts:
# - name: extra-storage
# mountPath: /mnt/extra-storage

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

0 comments on commit 410ab89

Please sign in to comment.