Skip to content
Merged
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
3 changes: 3 additions & 0 deletions charts/docker-mailserver/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ spec:
priorityClassName: {{ .Values.deployment.priorityClassName }}
restartPolicy: "Always"
serviceAccountName: {{ template "dockermailserver.serviceAccountName" . }}
{{- with .Values.image.pullSecrets }}
imagePullSecrets: {{- toYaml . | nindent 8 }}
{{- end }}
securityContext:
{{ toYaml (coalesce .Values.deployment.securityContext .Values.securityContext) | indent 8 }}
{{- if .Values.deployment.tolerations }}
Expand Down
16 changes: 15 additions & 1 deletion charts/docker-mailserver/tests/deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,18 @@ tests:

- it: manifest should match snapshot
asserts:
- matchSnapshot: { }
- matchSnapshot: { }
- it: renders no imagePullSecrets by default
asserts:
- notExists:
path: spec.template.spec.imagePullSecrets

- it: passes image.pullSecrets to the pod
set:
image.pullSecrets:
- name: registry-credentials
asserts:
- equal:
path: spec.template.spec.imagePullSecrets
value:
- name: registry-credentials
5 changes: 5 additions & 0 deletions charts/docker-mailserver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ image:
## If image.tag is not defined it will default to `.Chart.appVersion`
# tag: "latest"
pullPolicy: "IfNotPresent"
## image.pullSecrets lists Secrets of type kubernetes.io/dockerconfigjson for pulling from a private registry.
## They apply to every container of the pod, including the metrics exporter.
# pullSecrets:
# - name: registry-credentials
pullSecrets: []

# Specify whether to create a serviceAccount for the pod. The name is generated from the
# dockermailserver.serviceAccountName template
Expand Down
Loading