| {{- if .Values.deployment.enabled }} |
| name: {{ template "coredns.fullname" . }} |
| namespace: {{ .Release.Namespace }} |
| labels: {{- include "coredns.labels" . | nindent 4 }} |
| {{- if .Values.customLabels }} |
| {{ toYaml .Values.customLabels | indent 4 }} |
| {{- with .Values.customAnnotations }} |
| {{- toYaml . | nindent 4 }} |
| {{- range $name, $conf := .Values.extraConfig }} |
| {{ $name }}{{ if $conf.parameters }} {{ $conf.parameters }}{{ end }} |
| {{ range .Values.servers }} |
| {{- range $idx, $zone := .zones }}{{ if $idx }} {{ else }}{{ end }}{{ default "" $zone.scheme }}{{ default "." $zone.zone }}{{ else }}.{{ end -}} |
| {{- if .port }}:{{ .port }} {{ end -}} |
| {{ .name }}{{ if .parameters }} {{ .parameters }}{{ end }}{{ if .configBlock }} { |
| {{ .configBlock | indent 12 }} |
| {{- range .Values.zoneFiles }} |
| {{ .filename }}: {{ toYaml .contents | indent 4 }} |