Skip to content

Commit

Permalink
fix(core): Ensure pod annotations are applied correctly (#346)
Browse files Browse the repository at this point in the history
Fixes #345
  • Loading branch information
zerodayyy authored Dec 15, 2022
1 parent f950fd2 commit 8158943
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
10 changes: 6 additions & 4 deletions keda/templates/12-keda-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
14 changes: 8 additions & 6 deletions keda/templates/22-metrics-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 8158943

Please sign in to comment.