From 9da46122d5bf39b66a12bfdf9ae2744f94ef092e Mon Sep 17 00:00:00 2001 From: Mathew Wicks Date: Thu, 6 Apr 2023 18:28:46 -0700 Subject: [PATCH] fix: also set `kubernetes_executor` airflow configs (#719) Signed-off-by: Mathew Wicks --- .../airflow/templates/config/secret-config-envs.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/charts/airflow/templates/config/secret-config-envs.yaml b/charts/airflow/templates/config/secret-config-envs.yaml index 462eeeac..e78a1f2e 100644 --- a/charts/airflow/templates/config/secret-config-envs.yaml +++ b/charts/airflow/templates/config/secret-config-envs.yaml @@ -182,17 +182,21 @@ data: ## Airflow Configs (Kubernetes) ## ================ {{- if include "airflow.executor.kubernetes_like" . }} - {{- if not .Values.airflow.config.AIRFLOW__KUBERNETES__NAMESPACE }} + {{- if not (or .Values.airflow.config.AIRFLOW__KUBERNETES__NAMESPACE .Values.airflow.config.AIRFLOW__KUBERNETES_EXECUTOR__NAMESPACE) }} AIRFLOW__KUBERNETES__NAMESPACE: {{ .Release.Namespace | toString | b64enc | quote }} + AIRFLOW__KUBERNETES_EXECUTOR__NAMESPACE: {{ .Release.Namespace | toString | b64enc | quote }} {{- end }} - {{- if not .Values.airflow.config.AIRFLOW__KUBERNETES__WORKER_CONTAINER_REPOSITORY }} + {{- if not (or .Values.airflow.config.AIRFLOW__KUBERNETES__WORKER_CONTAINER_REPOSITORY .Values.airflow.config.AIRFLOW__KUBERNETES_EXECUTOR__WORKER_CONTAINER_REPOSITORY) }} AIRFLOW__KUBERNETES__WORKER_CONTAINER_REPOSITORY: {{ .Values.airflow.image.repository | toString | b64enc | quote }} + AIRFLOW__KUBERNETES_EXECUTOR__WORKER_CONTAINER_REPOSITORY: {{ .Values.airflow.image.repository | toString | b64enc | quote }} {{- end }} - {{- if not .Values.airflow.config.AIRFLOW__KUBERNETES__WORKER_CONTAINER_TAG }} + {{- if not (or .Values.airflow.config.AIRFLOW__KUBERNETES__WORKER_CONTAINER_TAG .Values.airflow.config.AIRFLOW__KUBERNETES_EXECUTOR__WORKER_CONTAINER_TAG) }} AIRFLOW__KUBERNETES__WORKER_CONTAINER_TAG: {{ .Values.airflow.image.tag | toString | b64enc | quote }} + AIRFLOW__KUBERNETES_EXECUTOR__WORKER_CONTAINER_TAG: {{ .Values.airflow.image.tag | toString | b64enc | quote }} {{- end }} - {{- if not .Values.airflow.config.AIRFLOW__KUBERNETES__POD_TEMPLATE_FILE }} + {{- if not (or .Values.airflow.config.AIRFLOW__KUBERNETES__POD_TEMPLATE_FILE .Values.airflow.config.AIRFLOW__KUBERNETES_EXECUTOR__POD_TEMPLATE_FILE) }} AIRFLOW__KUBERNETES__POD_TEMPLATE_FILE: {{ "/opt/airflow/pod_templates/pod_template.yaml" | b64enc | quote }} + AIRFLOW__KUBERNETES_EXECUTOR__POD_TEMPLATE_FILE: {{ "/opt/airflow/pod_templates/pod_template.yaml" | b64enc | quote }} {{- end }} {{- if .Values.airflow.legacyCommands }}