diff --git a/charts/coredns/templates/service-metrics.yaml b/charts/coredns/templates/service-metrics.yaml index fab89f3..bd1eaae 100644 --- a/charts/coredns/templates/service-metrics.yaml +++ b/charts/coredns/templates/service-metrics.yaml @@ -17,18 +17,18 @@ metadata: {{- if .Values.customLabels }} {{ toYaml .Values.customLabels | indent 4 }} {{- end }} -{{- if or .Values.prometheus.service.annotations .Values.service.annotations .Values.customAnnotations }} + {{- if or .Values.prometheus.service.annotations .Values.service.annotations .Values.customAnnotations }} annotations: -{{- if .Values.prometheus.service.annotations }} -{{ toYaml .Values.prometheus.service.annotations | indent 4 }} -{{- end }} -{{- if .Values.service.annotations }} -{{ toYaml .Values.service.annotations | indent 4 }} -{{- end }} -{{- if .Values.customAnnotations }} -{{ toYaml .Values.customAnnotations | indent 4 }} -{{- end }} -{{- end }} + {{- if .Values.prometheus.service.annotations }} + {{- toYaml .Values.prometheus.service.annotations | nindent 4 }} + {{- end }} + {{- if .Values.service.annotations }} + {{- toYaml .Values.service.annotations | nindent 4 }} + {{- end }} + {{- if .Values.customAnnotations }} + {{- toYaml .Values.customAnnotations | nindent 4 }} + {{- end }} + {{- end }} spec: selector: app.kubernetes.io/instance: {{ .Release.Name | quote }}