From ca68e31b5569e93e46f4275318a84e2dea2dce55 Mon Sep 17 00:00:00 2001 From: Mathew Wicks Date: Tue, 20 Apr 2021 12:06:38 +1000 Subject: [PATCH] dont include git-sync containers in webserver for airflow 2.0 Signed-off-by: Mathew Wicks --- .../airflow/templates/webserver/webserver-deployment.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/charts/airflow/templates/webserver/webserver-deployment.yaml b/charts/airflow/templates/webserver/webserver-deployment.yaml index cd2dcbd7..e33c3902 100644 --- a/charts/airflow/templates/webserver/webserver-deployment.yaml +++ b/charts/airflow/templates/webserver/webserver-deployment.yaml @@ -79,7 +79,8 @@ spec: {{- end }} {{- include "airflow.init_container.check_db" . | indent 8 }} {{- include "airflow.init_container.wait_for_db_migrations" . | indent 8 }} - {{- if .Values.dags.gitSync.enabled }} + {{- if and (.Values.dags.gitSync.enabled) (.Values.airflow.legacyCommands) }} + {{- /* after 2.0, webserver no longer needs the DAG files, due to DAG Serialization */ -}} {{- include "airflow.container.git_sync" (dict "Release" .Release "Values" .Values "sync_one_time" "true") | indent 8 }} {{- end }} containers: @@ -138,7 +139,8 @@ spec: mountPath: /opt/airflow/webserver_config.py subPath: webserver_config.py readOnly: true - {{- if .Values.dags.gitSync.enabled }} + {{- if and (.Values.dags.gitSync.enabled) (.Values.airflow.legacyCommands) }} + {{- /* after 2.0, webserver no longer needs the DAG files, due to DAG Serialization */ -}} {{- include "airflow.container.git_sync" . | indent 8 }} {{- end }} {{- if .Values.airflow.extraContainers }}