diff --git a/keda/templates/12-keda-deployment.yaml b/keda/templates/12-keda-deployment.yaml index b28bffde..e3187410 100644 --- a/keda/templates/12-keda-deployment.yaml +++ b/keda/templates/12-keda-deployment.yaml @@ -35,11 +35,13 @@ spec: {{- if .Values.podIdentity.azureWorkload.enabled }} azure.workload.identity/use: "true" {{- end }} - {{- if .Values.podAnnotations.keda }} annotations: - {{- toYaml .Values.podAnnotations.keda | nindent 8 }} - {{- toYaml .Values.additionalAnnotations | nindent 8 }} - {{- end }} + {{- if .Values.podAnnotations.keda }} + {{- toYaml .Values.podAnnotations.keda | nindent 8 }} + {{- end }} + {{- if .Values.additionalAnnotations }} + {{- toYaml .Values.additionalAnnotations | nindent 8 }} + {{- end }} spec: {{- if .Values.priorityClassName }} priorityClassName: {{ .Values.priorityClassName | quote }} diff --git a/keda/templates/22-metrics-deployment.yaml b/keda/templates/22-metrics-deployment.yaml index 7efa3f71..18f1155f 100644 --- a/keda/templates/22-metrics-deployment.yaml +++ b/keda/templates/22-metrics-deployment.yaml @@ -34,15 +34,17 @@ spec: azure.workload.identity/use: "true" {{- end }} annotations: - {{- toYaml .Values.additionalAnnotations | nindent 8 }} - {{- if and .Values.prometheus.metricServer.enabled ( not .Values.prometheus.metricServer.podMonitor.enabled ) }} + {{- if .Values.additionalAnnotations }} + {{- toYaml .Values.additionalAnnotations | nindent 8 }} + {{- end }} + {{- if and .Values.prometheus.metricServer.enabled ( not .Values.prometheus.metricServer.podMonitor.enabled ) }} prometheus.io/scrape: "true" prometheus.io/port: {{ .Values.prometheus.metricServer.port | quote }} prometheus.io/path: {{ .Values.prometheus.metricServer.path }} - {{- end }} - {{- if .Values.podAnnotations.metricsAdapter }} - {{- toYaml .Values.podAnnotations.metricsAdapter | nindent 8}} - {{- end }} + {{- end }} + {{- if .Values.podAnnotations.metricsAdapter }} + {{- toYaml .Values.podAnnotations.metricsAdapter | nindent 8}} + {{- end }} spec: {{- if .Values.priorityClassName }} priorityClassName: {{ .Values.priorityClassName | quote }}