You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/01/10 17:52:23 UTC

[GitHub] [airflow] ashb commented on a change in pull request #6230: [AIRFLOW-5413] Allow K8S worker pod to be configured from JSON/YAML file

ashb 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_r365355429
 
 

 ##########
 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:
   @davlum I'd like to see more validation please -- ideally if _any_ of the other settings are set/have a non-default value and `pod_template_file` is I'd like it to throw an exception.

----------------------------------------------------------------
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