diff --git a/charts/redash/templates/hook-migrations-job.yaml b/charts/redash/templates/hook-migrations-job.yaml index d8e7b34..673bbe7 100644 --- a/charts/redash/templates/hook-migrations-job.yaml +++ b/charts/redash/templates/hook-migrations-job.yaml @@ -21,7 +21,7 @@ spec: {{- tpl (toYaml .) $ | nindent 8 }} {{- end }} {{- with .Values.migrations.podAnnotations }} - annotations: {{ toYaml . | nindent 8 }} + annotations: {{ tpl (toYaml .) $ | nindent 8 }} {{- end }} spec: {{- with .Values.imagePullSecrets }} diff --git a/charts/redash/templates/scheduler-deployment.yaml b/charts/redash/templates/scheduler-deployment.yaml index 7a8194b..af5f4ca 100644 --- a/charts/redash/templates/scheduler-deployment.yaml +++ b/charts/redash/templates/scheduler-deployment.yaml @@ -21,8 +21,8 @@ spec: {{- with .Values.scheduler.podLabels }} {{- tpl (toYaml .) $ | nindent 8 }} {{- end }} - {{- if .Values.scheduler.podAnnotations }} - annotations: {{ toYaml .Values.scheduler.podAnnotations | nindent 8 }} + {{- with .Values.scheduler.podAnnotations }} + annotations: {{ tpl (toYaml .) $ | nindent 8 }} {{- end }} spec: {{ with .Values.imagePullSecrets -}} diff --git a/charts/redash/templates/server-deployment.yaml b/charts/redash/templates/server-deployment.yaml index 99d78ea..a8b9669 100644 --- a/charts/redash/templates/server-deployment.yaml +++ b/charts/redash/templates/server-deployment.yaml @@ -16,11 +16,11 @@ spec: labels: {{- include "redash.selectorLabels" . | nindent 8 }} app.kubernetes.io/component: server - {{- if .Values.server.podLabels }} - {{- tpl (toYaml .Values.server.podLabels) $ | nindent 8 }} + {{- with .Values.server.podLabels }} + {{- tpl (toYaml .) $ | nindent 8 }} {{- end }} {{- with .Values.server.podAnnotations }} - annotations: {{ toYaml . | nindent 8 }} + annotations: {{ tpl (toYaml .) $ | nindent 8 }} {{- end }} spec: {{ with .Values.imagePullSecrets -}} diff --git a/charts/redash/templates/worker-deployment.yaml b/charts/redash/templates/worker-deployment.yaml index 9a448ab..d7f3302 100644 --- a/charts/redash/templates/worker-deployment.yaml +++ b/charts/redash/templates/worker-deployment.yaml @@ -13,12 +13,13 @@ spec: matchLabels: {{ include "redash.selectorLabels" $context | nindent 6 }} template: metadata: - labels: {{ include "redash.selectorLabels" $context | nindent 8 }} - {{- if $workerConfig.podLabels }} - {{ tpl (toYaml $workerConfig.podLabels) $ | nindent 8 }} - {{- end }} - {{- with $workerConfig.podAnnotations -}} - annotations: {{ toYaml . | nindent 8 }} + labels: + {{- include "redash.selectorLabels" $context | nindent 8 }} + {{- with $workerConfig.podLabels }} + {{- tpl (toYaml .) $ | nindent 8 }} + {{- end }} + {{- with $workerConfig.podAnnotations }} + annotations: {{ tpl (toYaml .) $ | nindent 8 }} {{- end }} spec: {{ with $.Values.imagePullSecrets -}}