turbaszek commented on a change in pull request #10393:
URL: https://github.com/apache/airflow/pull/10393#discussion_r472917303
##########
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
+ pod = None
Review comment:
```suggestion
```
Probably no need for that as we have if/else
----------------------------------------------------------------
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:
[email protected]