Skip to content

Commit 613b143

Browse files
author
johnstarx
committed
Added initContainers
1 parent 8d6d0e6 commit 613b143

3 files changed

Lines changed: 47 additions & 1 deletion

File tree

charts/docker-mailserver/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
appVersion: "14.0.0"
33
description: A fullstack but simple mailserver (smtp, imap, antispam, antivirus, ssl...) using Docker.
44
name: docker-mailserver
5-
version: 4.0.0
5+
version: 4.0.2
66
sources:
77
- https://github.com/docker-mailserver/docker-mailserver-helm
88
maintainers:

charts/docker-mailserver/templates/deployment.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,29 @@ spec:
8080
{{- end }}
8181
{{- end }}
8282

83+
# Extra volumes
84+
{{- with .Values.deployment.extraVolumes }}
85+
{{- toYaml . | nindent 8 }}
86+
{{- end }}
87+
88+
{{- with .Values.deployment.initContainers }}
89+
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 }}
104+
{{- end }}
105+
83106
containers:
84107
- name: docker-mailserver
85108
image: {{ .Values.image.name }}:{{ default .Chart.AppVersion .Values.image.tag }}
@@ -147,6 +170,11 @@ spec:
147170
{{- end }}
148171
{{- end }}
149172

173+
# Mount Extra Volumes
174+
{{- with $.Values.deployment.extraVolumeMounts }}
175+
{{- toYaml . | nindent 12 }}
176+
{{- end }}
177+
150178
livenessProbe:
151179
exec:
152180
command:

charts/docker-mailserver/values.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,24 @@ deployment:
272272
## Optionally specify tolerations for the deployment
273273
tolerations: []
274274

275+
## Optionally specify initContainers
276+
initContainers: []
277+
# - name: init
278+
# image: alpine:3
279+
# command: [sh, -c]
280+
# args:
281+
# - echo "Hello, world!" > /mnt/extra-storage/test
282+
283+
## Optionally specify a list of extra mounts to add (normally used with extraVolumes)
284+
extraVolumeMounts: []
285+
# - name: extra-storage
286+
# mountPath: /mnt/extra-storage
287+
288+
## Optionally specify a list of extra volumes to add
289+
extraVolumes: []
290+
# - name: extra-storage
291+
# emptyDir: {}
292+
275293
service:
276294
## What scope the service should be exposed in. One of:
277295
## - LoadBalancer (to the world)

0 commit comments

Comments
 (0)