Skip to content

Commit

Permalink
Merge pull request #125 from johnstarxx/init-containers
Browse files Browse the repository at this point in the history
Added initContainers
  • Loading branch information
cfis authored Jul 14, 2024
2 parents a95f358 + df548cd commit 2b11e8b
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/docker-mailserver/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "14.0.0"
description: A fullstack but simple mailserver (smtp, imap, antispam, antivirus, ssl...) using Docker.
name: docker-mailserver
version: 4.0.1
version: 4.0.3
sources:
- https://github.com/docker-mailserver/docker-mailserver-helm
maintainers:
Expand Down
17 changes: 17 additions & 0 deletions charts/docker-mailserver/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,18 @@ spec:
{{- end }}
{{- end }}

# Extra volumes
{{- with .Values.deployment.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}

{{- if .Values.deployment.initContainers }}
initContainers:
{{- with .Values.deployment.initContainers }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}

containers:
- name: docker-mailserver
image: {{ .Values.image.name }}:{{ default .Chart.AppVersion .Values.image.tag }}
Expand Down Expand Up @@ -147,6 +159,11 @@ spec:
{{- end }}
{{- end }}

# Mount Extra Volumes
{{- with $.Values.deployment.extraVolumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}

livenessProbe:
exec:
command:
Expand Down
21 changes: 21 additions & 0 deletions charts/docker-mailserver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,27 @@ deployment:
## Optionally specify tolerations for the deployment
tolerations: []

## Optionally specify initContainers
initContainers: []
# - name: init
# image: alpine:3
# 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: []
# - name: extra-storage
# mountPath: /mnt/extra-storage

## Optionally specify a list of extra volumes to add
extraVolumes: []
# - name: extra-storage
# emptyDir: {}

service:
## What scope the service should be exposed in. One of:
## - LoadBalancer (to the world)
Expand Down

0 comments on commit 2b11e8b

Please sign in to comment.