4444 restartPolicy : " Always"
4545 serviceAccountName : {{ template "dockermailserver.serviceAccountName" . }}
4646 securityContext :
47- {{ toYaml .Values.securityContext | indent 8 }}
47+ {{ toYaml (coalesce .Values.deployment. securityContext .Values.securityContext) | indent 8 }}
4848 {{- if .Values.deployment.tolerations }}
4949 tolerations : {{- toYaml .Values.deployment.tolerations | nindent 8 }}
5050 {{ end }}
@@ -217,7 +217,7 @@ spec:
217217 containerPort : 10465
218218 - name : sub-proxy
219219 containerPort : 10587
220- {{- end }}
220+ {{- end }}
221221
222222 {{- if and (.Values.deployment.env.ENABLE_IMAP) (not .Values.deployment.env.SMTP_ONLY) }}
223223 - name : imap
@@ -229,8 +229,8 @@ spec:
229229 containerPort : 10143
230230 - name : imaps-proxy
231231 containerPort : 10993
232- {{- end }}
233- {{- end }}
232+ {{- end }}
233+ {{- end }}
234234
235235 {{- if and (.Values.deployment.env.ENABLE_POP3) (not .Values.deployment.env.SMTP_ONLY) }}
236236 - name : pop3
@@ -242,29 +242,29 @@ spec:
242242 containerPort : 10110
243243 - name : pop3s-proxy
244244 containerPort : 10995
245- {{- end }}
246- {{- end }}
245+ {{- end }}
246+ {{- end }}
247247
248248 {{- if .Values.deployment.env.ENABLE_RSPAMD }}
249249 - name : rspamd
250- containerPort : 11334
251- {{- end }}
250+ containerPort : 11334
251+ {{- end }}
252252
253253 {{- if and (.Values.deployment.env.ENABLE_MANAGESIEVE) (not .Values.deployment.env.SMTP_ONLY) }}
254254 - name : managesieve
255- containerPort : 4190
255+ containerPort : 4190
256256 {{- if .Values.proxyProtocol.enabled }}
257257 - name : msieve-proxy
258258 containerPort : 14190
259- {{- end }}
260- {{- end }}
259+ {{- end }}
260+ {{- end }}
261261
262262{{- if .Values.metrics.enabled }}
263263 - name : metrics-exporter
264264 image : {{ .Values.metrics.image.name }}:{{ .Values.metrics.image.tag }}
265265 imagePullPolicy : {{ .Values.metrics.image.pullPolicy }}
266266 command : ["/bin/postfix_exporter"]
267- args :
267+ args :
268268 - " --postfix.showq_path"
269269 - " /var/mail-state/spool-postfix/public/showq"
270270 - " --postfix.logfile_path"
@@ -279,7 +279,7 @@ spec:
279279 {{- if and .Values.metrics.resizePolicy (semverCompare ">=1.33-0" .Capabilities.KubeVersion.Version) }}
280280 resizePolicy :
281281{{ toYaml .Values.metrics.resizePolicy | indent 12 }}
282- {{- end }}
282+ {{- end }}
283283 securityContext :
284284{{ toYaml .Values.deployment.containerSecurityContext | indent 12 }}
285285
0 commit comments