Skip to content

Commit f123414

Browse files
fix: make flower affected by default nodeSelector, affinity, tolerations (#405)
Signed-off-by: Mathew Wicks <[email protected]>
1 parent c9de9e4 commit f123414

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

charts/airflow/templates/flower/flower-deployment.yaml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{{- if .Values.flower.enabled }}
2+
{{- $podNodeSelector := include "airflow.podNodeSelector" (dict "Release" .Release "Values" .Values "nodeSelector" .Values.flower.nodeSelector) }}
3+
{{- $podAffinity := include "airflow.podAffinity" (dict "Release" .Release "Values" .Values "affinity" .Values.flower.affinity) }}
4+
{{- $podTolerations := include "airflow.podTolerations" (dict "Release" .Release "Values" .Values "tolerations" .Values.flower.tolerations) }}
25
{{- $podSecurityContext := include "airflow.podSecurityContext" (dict "Release" .Release "Values" .Values "securityContext" .Values.flower.securityContext) }}
36
{{- $extraPipPackages := concat .Values.airflow.extraPipPackages .Values.flower.extraPipPackages }}
47
{{- $extraVolumeMounts := .Values.flower.extraVolumeMounts }}
@@ -62,23 +65,23 @@ spec:
6265
imagePullSecrets:
6366
- name: {{ .Values.airflow.image.pullSecret }}
6467
{{- end }}
65-
{{- if .Values.flower.nodeSelector }}
68+
{{- if $podNodeSelector }}
6669
nodeSelector:
67-
{{- toYaml .Values.flower.nodeSelector | nindent 8 }}
70+
{{- $podNodeSelector | nindent 8 }}
6871
{{- end }}
69-
{{- if .Values.flower.affinity }}
72+
{{- if $podAffinity }}
7073
affinity:
71-
{{- toYaml .Values.flower.affinity | nindent 8 }}
74+
{{- $podAffinity | nindent 8 }}
7275
{{- end }}
73-
{{- if .Values.flower.tolerations }}
76+
{{- if $podTolerations }}
7477
tolerations:
75-
{{- toYaml .Values.flower.tolerations | nindent 8 }}
78+
{{- $podTolerations | nindent 8 }}
7679
{{- end }}
77-
serviceAccountName: {{ include "airflow.serviceAccountName" . }}
7880
{{- if $podSecurityContext }}
7981
securityContext:
8082
{{- $podSecurityContext | nindent 8 }}
8183
{{- end }}
84+
serviceAccountName: {{ include "airflow.serviceAccountName" . }}
8285
initContainers:
8386
{{- if $extraPipPackages }}
8487
{{- include "airflow.init_container.install_pip_packages" (dict "Release" .Release "Values" .Values "extraPipPackages" $extraPipPackages) | indent 8 }}

0 commit comments

Comments
 (0)