Skip to content

Commit

Permalink
add additionalMounts and additionalVolumeMounts to values and deploym…
Browse files Browse the repository at this point in the history
…ent. (#40)

This is to simplify injecting dynamic configuration files (for example
postfix maps modified by an external program) into the container.

Bump chart version to 0.3.1.
  • Loading branch information
rspier authored Jan 5, 2022
1 parent e628a3f commit 64e9fba
Show file tree
Hide file tree
Showing 3 changed files with 16 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: "8.0.1"
description: A fullstack but simple mailserver (smtp, imap, antispam, antivirus, ssl...) using Docker.
name: docker-mailserver
version: 0.3.2
version: 0.3.3
sources:
- https://github.com/funkypenguin/helm-docker-mailserver
maintainers:
Expand Down
6 changes: 6 additions & 0 deletions charts/docker-mailserver/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ spec:
{{- else }}
secretName: {{ template "dockermailserver.fullname" . }}-tls
{{- end }}
{{- end }}
{{ if .Values.additionalVolumes }}
{{- toYaml .Values.additionalVolumes | indent 9 }}
{{- end }}
initContainers:
- name: prep-config
Expand Down Expand Up @@ -143,6 +146,9 @@ spec:
readOnly: true
{{- end }}
{{- end }}
{{ if .Values.additionalVolumeMounts }}
{{ toYaml .Values.additionalVolumeMounts | indent 12 }}
{{- end }}
livenessProbe:
exec:
command:
Expand Down
9 changes: 9 additions & 0 deletions charts/docker-mailserver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@ ssl:
psp:
create: true

## Mount additional volumes into the container. Useful for persistent logs or
## injecting additional config files.
#additionalVolumes:
# - name: "additional"
# emptyDir: {}
#additionalVolumeMounts:
# - name: additional
# mountPath: /additional

demoMode:
# demoMode.enabled ignores the contents of helm-chart/docker-mailserver/config and creates minimal static configuration to be used instead. A single account (user "[email protected]", password "password") will be configured for the purpose of validating core functions and connectivity, before applying user config
enabled: true
Expand Down

0 comments on commit 64e9fba

Please sign in to comment.