Skip to content

Commit

Permalink
fix: make flower affected by default nodeSelector, affinity, tolerati…
Browse files Browse the repository at this point in the history
…ons (#405)

Signed-off-by: Mathew Wicks <[email protected]>
  • Loading branch information
thesuperzapper authored Aug 24, 2021
1 parent c9de9e4 commit f123414
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions charts/airflow/templates/flower/flower-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{{- if .Values.flower.enabled }}
{{- $podNodeSelector := include "airflow.podNodeSelector" (dict "Release" .Release "Values" .Values "nodeSelector" .Values.flower.nodeSelector) }}
{{- $podAffinity := include "airflow.podAffinity" (dict "Release" .Release "Values" .Values "affinity" .Values.flower.affinity) }}
{{- $podTolerations := include "airflow.podTolerations" (dict "Release" .Release "Values" .Values "tolerations" .Values.flower.tolerations) }}
{{- $podSecurityContext := include "airflow.podSecurityContext" (dict "Release" .Release "Values" .Values "securityContext" .Values.flower.securityContext) }}
{{- $extraPipPackages := concat .Values.airflow.extraPipPackages .Values.flower.extraPipPackages }}
{{- $extraVolumeMounts := .Values.flower.extraVolumeMounts }}
Expand Down Expand Up @@ -62,23 +65,23 @@ spec:
imagePullSecrets:
- name: {{ .Values.airflow.image.pullSecret }}
{{- end }}
{{- if .Values.flower.nodeSelector }}
{{- if $podNodeSelector }}
nodeSelector:
{{- toYaml .Values.flower.nodeSelector | nindent 8 }}
{{- $podNodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.flower.affinity }}
{{- if $podAffinity }}
affinity:
{{- toYaml .Values.flower.affinity | nindent 8 }}
{{- $podAffinity | nindent 8 }}
{{- end }}
{{- if .Values.flower.tolerations }}
{{- if $podTolerations }}
tolerations:
{{- toYaml .Values.flower.tolerations | nindent 8 }}
{{- $podTolerations | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "airflow.serviceAccountName" . }}
{{- if $podSecurityContext }}
securityContext:
{{- $podSecurityContext | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "airflow.serviceAccountName" . }}
initContainers:
{{- if $extraPipPackages }}
{{- include "airflow.init_container.install_pip_packages" (dict "Release" .Release "Values" .Values "extraPipPackages" $extraPipPackages) | indent 8 }}
Expand Down

0 comments on commit f123414

Please sign in to comment.