kaxil commented on a change in pull request #10756:
URL: https://github.com/apache/airflow/pull/10756#discussion_r484512148
##########
File path: airflow/kubernetes/pod_generator.py
##########
@@ -324,47 +325,36 @@ def add_sidecar(pod: k8s.V1Pod) -> k8s.V1Pod:
@staticmethod
def from_obj(obj) -> Optional[k8s.V1Pod]:
"""Converts to pod from obj"""
+
if obj is None:
return None
- if isinstance(obj, PodGenerator):
- return obj.gen_pod()
-
- if not isinstance(obj, dict):
- raise TypeError(
- 'Cannot convert a non-dictionary or non-PodGenerator '
- 'object into a KubernetesExecutorConfig')
+ k8s_legacy_object = obj.get("KubernetesExecutor", None)
+ k8s_object = obj.get("podOverride", None)
Review comment:
```suggestion
k8s_object = obj.get("pod_override", None)
```
I think using snake_case might be better, wdyt?
----------------------------------------------------------------
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]