airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [airflow] dimberman commented on a change in pull request #6230: [AIRFLOW-5413] Allow K8S worker pod to be configured from JSON/YAML file
Date Tue, 10 Dec 2019 22:22:30 GMT
dimberman commented on a change in pull request #6230: [AIRFLOW-5413] Allow K8S worker pod
to be configured from JSON/YAML file
URL: https://github.com/apache/airflow/pull/6230#discussion_r356310198
 
 

 ##########
 File path: airflow/kubernetes/worker_configuration.py
 ##########
 @@ -389,11 +386,14 @@ def make_pod(self, namespace, worker_uuid, pod_id, dag_id, task_id,
execution_da
             envs=self._get_environment(),
             node_selectors=self.kube_config.kube_node_selectors,
             service_account_name=self.kube_config.worker_service_account_name,
-        )
+            pod_template_file_or_string=self.kube_config.pod_template_file
+        ).gen_pod()
 
-        pod = pod_generator.gen_pod()
-        pod.spec.containers[0].env_from = pod.spec.containers[0].env_from or []
-        pod.spec.containers[0].env_from.extend(self._get_env_from())
-        pod.spec.security_context = self._get_security_context()
+        if self.kube_config.pod_template_file:
 
 Review comment:
   Agreed we should validate at startup

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message