Skip to content

Commit 5a9f4ba

Browse files
committed
Fix specifying securityContext - see docker-mailserver#163
1 parent 6a1579c commit 5a9f4ba

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

charts/docker-mailserver/templates/deployment.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ spec:
4343
priorityClassName: {{ .Values.deployment.priorityClassName }}
4444
restartPolicy: "Always"
4545
serviceAccountName: {{ template "dockermailserver.serviceAccountName" . }}
46+
{{- if .Values.deployment.securityContext }}
4647
securityContext:
47-
{{ toYaml .Values.securityContext | indent 8 }}
48+
{{ toYaml .Values.deployment.securityContext | indent 8 }}
49+
{{- end }}
4850
{{- if .Values.deployment.tolerations }}
4951
tolerations: {{- toYaml .Values.deployment.tolerations | nindent 8 }}
5052
{{ end }}

charts/docker-mailserver/values.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,7 @@ deployment:
221221
RELAY_USER:
222222
RELAY_PASSWORD:
223223

224-
securityContext:
225-
runAsUser: 5000
226-
runAsGroup: 5000
224+
securityContext: {}
227225

228226
containerSecurityContext:
229227
readOnlyRootFilesystem: false # incompatible with the way docker-mailserver works

0 commit comments

Comments
 (0)