| {{- if and .Values.deployment.enabled .Values.serviceAccount.create }} |
| name: {{ template "coredns.serviceAccountName" . }} |
| namespace: {{ .Release.Namespace }} |
| labels: {{- include "coredns.labels" . | nindent 4 }} |
| {{- if or .Values.serviceAccount.annotations .Values.customAnnotations }} |
| {{- if .Values.customAnnotations }} |
| {{- toYaml .Values.customAnnotations | nindent 4 }} |
| {{- if .Values.serviceAccount.annotations }} |
| {{- toYaml .Values.serviceAccount.annotations | nindent 4 }} |
| {{- if .Values.image.pullSecrets }} |
| {{- range .Values.image.pullSecrets }} |