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/08/24 23:30:36 UTC

[GitHub] [airflow] dimberman commented on a change in pull request #10393: Simplify the K8sExecutor and K8sPodOperator

dimberman commented on a change in pull request #10393:
URL: https://github.com/apache/airflow/pull/10393#discussion_r475959589



##########
File path: airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py
##########
@@ -365,44 +365,57 @@ def create_new_pod_for_operator(self, labels, launcher) -> Tuple[State, k8s.V1Po
                 }
             )
             self.labels.update(labels)
-        pod = pod_generator.PodGenerator(
-            image=self.image,
-            namespace=self.namespace,
-            cmds=self.cmds,
-            args=self.arguments,
-            labels=self.labels,
-            name=self.name,
-            envs=self.env_vars,
-            extract_xcom=self.do_xcom_push,
-            image_pull_policy=self.image_pull_policy,
-            node_selectors=self.node_selectors,
-            annotations=self.annotations,
-            affinity=self.affinity,
-            image_pull_secrets=self.image_pull_secrets,
-            service_account_name=self.service_account_name,
-            hostnetwork=self.hostnetwork,
-            tolerations=self.tolerations,
-            configmaps=self.configmaps,
-            security_context=self.security_context,
-            dnspolicy=self.dnspolicy,
-            schedulername=self.schedulername,
-            init_containers=self.init_containers,
-            restart_policy='Never',
-            priority_class_name=self.priority_class_name,
-            pod_template_file=self.pod_template_file,
-            pod=self.full_pod_spec,
-        ).gen_pod()
+        from kubernetes.client import models as k8s

Review comment:
       Nope removed that




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