Skip to content

Commit

Permalink
Allow templating in podAnnotations & podLabels variables
Browse files Browse the repository at this point in the history
  • Loading branch information
frivoire committed Jun 14, 2024
1 parent ffbd462 commit 99e139a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion charts/redash/templates/hook-migrations-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions charts/redash/templates/scheduler-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
Expand Down
6 changes: 3 additions & 3 deletions charts/redash/templates/server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
Expand Down
13 changes: 7 additions & 6 deletions charts/redash/templates/worker-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
Expand Down

0 comments on commit 99e139a

Please sign in to comment.