Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: "15.1.0"
description: A fullstack but simple mailserver (smtp, imap, antispam, antivirus, ssl...) using Docker.
name: docker-mailserver
version: 5.1.1
version: 5.1.2
sources:
- https://github.com/docker-mailserver/docker-mailserver-helm
maintainers:
Expand Down
26 changes: 13 additions & 13 deletions charts/docker-mailserver/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ spec:
restartPolicy: "Always"
serviceAccountName: {{ template "dockermailserver.serviceAccountName" . }}
securityContext:
{{ toYaml .Values.securityContext | indent 8 }}
{{ toYaml (coalesce .Values.deployment.securityContext .Values.securityContext) | indent 8 }}
{{- if .Values.deployment.tolerations }}
tolerations: {{- toYaml .Values.deployment.tolerations | nindent 8 }}
{{ end }}
Expand Down Expand Up @@ -217,7 +217,7 @@ spec:
containerPort: 10465
- name: sub-proxy
containerPort: 10587
{{- end }}
{{- end }}

{{- if and (.Values.deployment.env.ENABLE_IMAP) (not .Values.deployment.env.SMTP_ONLY) }}
- name: imap
Expand All @@ -229,8 +229,8 @@ spec:
containerPort: 10143
- name: imaps-proxy
containerPort: 10993
{{- end }}
{{- end }}
{{- end }}
{{- end }}

{{- if and (.Values.deployment.env.ENABLE_POP3) (not .Values.deployment.env.SMTP_ONLY) }}
- name: pop3
Expand All @@ -242,29 +242,29 @@ spec:
containerPort: 10110
- name: pop3s-proxy
containerPort: 10995
{{- end }}
{{- end }}
{{- end }}
{{- end }}

{{- if .Values.deployment.env.ENABLE_RSPAMD }}
- name: rspamd
containerPort: 11334
{{- end }}
containerPort: 11334
{{- end }}

{{- if and (.Values.deployment.env.ENABLE_MANAGESIEVE) (not .Values.deployment.env.SMTP_ONLY) }}
- name: managesieve
containerPort: 4190
containerPort: 4190
{{- if .Values.proxyProtocol.enabled }}
- name: msieve-proxy
containerPort: 14190
{{- end }}
{{- end }}
{{- end }}
{{- end }}

{{- if .Values.metrics.enabled }}
- name: metrics-exporter
image: {{ .Values.metrics.image.name }}:{{ .Values.metrics.image.tag }}
imagePullPolicy: {{ .Values.metrics.image.pullPolicy }}
command: ["/bin/postfix_exporter"]
args:
args:
- "--postfix.showq_path"
- "/var/mail-state/spool-postfix/public/showq"
- "--postfix.logfile_path"
Expand All @@ -279,7 +279,7 @@ spec:
{{- if and .Values.metrics.resizePolicy (semverCompare ">=1.33-0" .Capabilities.KubeVersion.Version) }}
resizePolicy:
{{ toYaml .Values.metrics.resizePolicy | indent 12 }}
{{- end }}
{{- end }}
securityContext:
{{ toYaml .Values.deployment.containerSecurityContext | indent 12 }}

Expand Down
6 changes: 3 additions & 3 deletions charts/docker-mailserver/templates/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ metadata:
name: {{ template "dockermailserver.fullname" $ }}-{{ $name }}
{{- if $pvc.annotations }}
annotations:
{{ toYaml $pvc.annotations }}
{{ toYaml $pvc.annotations }}
{{ end }}
spec:
accessModes:
{{ toYaml $pvc.accessModes | indent 2 }}

{{- if $pvc.storageClass }}
storageClassName: {{ $pvc.storageClass | quote }}
{{- end }}
{{- end }}
resources:
requests:
storage: {{ $pvc.size | quote }}
Expand Down
2 changes: 1 addition & 1 deletion charts/docker-mailserver/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
release: "{{ .Release.Name }}"
{{- if .Values.metrics.serviceMonitor.labels }}
{{ toYaml .Values.metrics.serviceMonitor.labels | indent 4 }}
{{ end }}
{{ end }}
name: {{ template "dockermailserver.fullname" . }}
spec:
endpoints:
Expand Down
6 changes: 2 additions & 4 deletions charts/docker-mailserver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,7 @@ deployment:
# set those unless you're using a secret
#RELAY_PASSWORD:

securityContext:
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I verified against v5.1.1 that this does not work. The pod won't start with this config.

runAsUser: 5000
runAsGroup: 5000
securityContext: {}

containerSecurityContext:
readOnlyRootFilesystem: false # incompatible with the way docker-mailserver works
Expand Down Expand Up @@ -618,7 +616,7 @@ configMaps:
# Enable PROXY Protocol support for these new service variants:
postconf -P 10587/inet/smtpd_upstream_proxy_protocol=haproxy
postconf -P 10465/inet/smtpd_upstream_proxy_protocol=haproxy

# Create a variant for port 25 too (NOTE: Port 10025 is already assigned in DMS to Amavis):
postconf -Mf smtp/inet | sed -e s/^smtp/12525/ >> /etc/postfix/master.cf
# Enable PROXY Protocol support:
Expand Down