diff --git a/charts/coredns/templates/configmap-autoscaler.yaml b/charts/coredns/templates/configmap-autoscaler.yaml index ef67d7b..c690e7a 100644 --- a/charts/coredns/templates/configmap-autoscaler.yaml +++ b/charts/coredns/templates/configmap-autoscaler.yaml @@ -18,11 +18,15 @@ metadata: {{- if .Values.customLabels }} {{- toYaml .Values.customLabels | nindent 4 }} {{- end }} -{{ if or .Values.autoscaler.configmap.annotations .Values.customAnnotations }} + {{- if or .Values.autoscaler.configmap.annotations .Values.customAnnotations }} annotations: -{{ toYaml .Values.customAnnotations | indent 4 }} -{{- toYaml .Values.autoscaler.configmap.annotations | nindent 4 }} -{{- end }} + {{- if .Values.customAnnotations }} + {{- toYaml .Values.customAnnotations | nindent 4 }} + {{- end }} + {{- if .Values.autoscaler.configmap.annotations -}} + {{ toYaml .Values.autoscaler.configmap.annotations | nindent 4 }} + {{- end }} + {{- end }} data: # When cluster is using large nodes(with more cores), "coresPerReplica" should dominate. # If using small nodes, "nodesPerReplica" should dominate. diff --git a/charts/coredns/templates/deployment.yaml b/charts/coredns/templates/deployment.yaml index 13b9bdc..5d05c22 100644 --- a/charts/coredns/templates/deployment.yaml +++ b/charts/coredns/templates/deployment.yaml @@ -18,11 +18,15 @@ metadata: {{- if .Values.customLabels }} {{ toYaml .Values.customLabels | indent 4 }} {{- end }} -{{ if or .Values.deployment.annotations .Values.customAnnotations }} + {{- if or .Values.deployment.annotations .Values.customAnnotations }} annotations: -{{ toYaml .Values.customAnnotations | indent 4 }} -{{ toYaml .Values.deployment.annotations | indent 4 }} -{{- end }} + {{- if .Values.customAnnotations }} + {{- toYaml .Values.customAnnotations | nindent 4 }} + {{- end }} + {{- if .Values.deployment.annotations }} + {{- toYaml .Values.deployment.annotations | nindent 4 }} + {{- end }} + {{- end }} spec: {{- if not .Values.autoscaler.enabled }} replicas: {{ .Values.replicaCount }} diff --git a/charts/coredns/templates/service-metrics.yaml b/charts/coredns/templates/service-metrics.yaml index 712a718..fab89f3 100644 --- a/charts/coredns/templates/service-metrics.yaml +++ b/charts/coredns/templates/service-metrics.yaml @@ -17,12 +17,18 @@ metadata: {{- if .Values.customLabels }} {{ toYaml .Values.customLabels | indent 4 }} {{- end }} +{{- 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 }} spec: selector: app.kubernetes.io/instance: {{ .Release.Name | quote }} diff --git a/charts/coredns/templates/service.yaml b/charts/coredns/templates/service.yaml index 5749e4b..94d6055 100644 --- a/charts/coredns/templates/service.yaml +++ b/charts/coredns/templates/service.yaml @@ -17,11 +17,15 @@ metadata: {{- if .Values.customLabels }} {{ toYaml .Values.customLabels | indent 4 }} {{- end }} + {{- if or .Values.service.annotations .Values.customAnnotations }} annotations: -{{ toYaml .Values.service.annotations | indent 4 }} -{{- if .Values.customAnnotations }} -{{ toYaml .Values.customAnnotations | indent 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 }} diff --git a/charts/coredns/templates/serviceaccount.yaml b/charts/coredns/templates/serviceaccount.yaml index c270b06..abc9646 100644 --- a/charts/coredns/templates/serviceaccount.yaml +++ b/charts/coredns/templates/serviceaccount.yaml @@ -13,11 +13,15 @@ metadata: kubernetes.io/name: "CoreDNS" {{- end }} app.kubernetes.io/name: {{ template "coredns.name" . }} -{{ if or .Values.serviceAccount.annotations .Values.customAnnotations }} + {{- if or .Values.serviceAccount.annotations .Values.customAnnotations }} annotations: -{{ toYaml .Values.customAnnotations | indent 4 }} -{{ toYaml .Values.serviceAccount.annotations | indent 4 }} -{{- end }} + {{- if .Values.customAnnotations }} + {{- toYaml .Values.customAnnotations | nindent 4 }} + {{- end }} + {{- if .Values.serviceAccount.annotations }} + {{- toYaml .Values.serviceAccount.annotations | nindent 4 }} + {{- end }} + {{- end }} {{- if .Values.image.pullSecrets }} imagePullSecrets: {{- range .Values.image.pullSecrets }}