From 8a689af000405f7fe66b5913b5e07cf425100bc9 Mon Sep 17 00:00:00 2001 From: abhishek bafna Date: Thu, 9 Apr 2020 16:01:22 +0530 Subject: [PATCH] Export scheduler env variable into worker pods. (#38) --- airflow/contrib/kubernetes/worker_configuration.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/airflow/contrib/kubernetes/worker_configuration.py b/airflow/contrib/kubernetes/worker_configuration.py index d6e313b3ec22f..684cf1be03d52 100644 --- a/airflow/contrib/kubernetes/worker_configuration.py +++ b/airflow/contrib/kubernetes/worker_configuration.py @@ -153,6 +153,13 @@ def _get_environment(self): self.kube_config.git_subpath # dags ) env['AIRFLOW__CORE__DAGS_FOLDER'] = dag_volume_mount_path + + # TODO This change can be submitted into the apache as well. + # Set the scheduler env into the worker pod. + os_env = os.environ + os_env.update(env) + env = os_env + return env def _get_configmaps(self):