diff --git a/charts/docker-mailserver/Chart.yaml b/charts/docker-mailserver/Chart.yaml index 308839f7..1f4f7b98 100644 --- a/charts/docker-mailserver/Chart.yaml +++ b/charts/docker-mailserver/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: "13.3.1" description: A fullstack but simple mailserver (smtp, imap, antispam, antivirus, ssl...) using Docker. name: docker-mailserver -version: 3.0.5 +version: 3.0.6 sources: - https://github.com/docker-mailserver/docker-mailserver-helm maintainers: diff --git a/charts/docker-mailserver/templates/deployment.yaml b/charts/docker-mailserver/templates/deployment.yaml index 0248b696..4dbabc8b 100644 --- a/charts/docker-mailserver/templates/deployment.yaml +++ b/charts/docker-mailserver/templates/deployment.yaml @@ -32,6 +32,7 @@ spec: nodeSelector: {{- toYaml .Values.deployment.nodeSelector | nindent 8 }} runtimeClassName: {{ .Values.deployment.runtimeClassName }} priorityClassName: {{ .Values.deployment.priorityClassName }} + restartPolicy: "Always" serviceAccountName: {{ template "dockermailserver.serviceAccountName" . }} securityContext: {{ toYaml .Values.securityContext | indent 8 }} @@ -100,6 +101,7 @@ spec: {{ toYaml .Values.deployment.containerSecurityContext | indent 12 }} volumeMounts: + # Certificate {{- if .Values.certificate }} - name: certificate mountPath: /tmp/dms/custom-certs @@ -128,7 +130,7 @@ spec: {{- end }} {{- end }} - # Volumes + # Mount Volumes {{- range $name, $persistence := .Values.persistence }} {{- if $persistence.enabled }} - name: {{ $name }} @@ -226,14 +228,11 @@ spec: {{ toYaml .Values.deployment.containerSecurityContext | indent 12 }} volumeMounts: - - name: data - mountPath: /var/log/mail - subPath: log - readOnly: true - - name: data - mountPath: /var/mail-state - subPath: mail-state - readOnly: true -{{- end }} - - restartPolicy: "Always" \ No newline at end of file + {{- range $name, $persistence := pick .Values.persistence "mail-log" "mail-state" }} + {{- if $persistence.enabled }} + - name: {{ $name }} + mountPath: {{ $persistence.mountPath }} + readonly: true + {{- end }} + {{- end }} +{{- end }} \ No newline at end of file