dimberman commented on a change in pull request #10756:
URL: https://github.com/apache/airflow/pull/10756#discussion_r484512639
##########
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)
Review comment:
@kaxil yes, if the user uses the "KubernetesExecutor" key for the dict
it will work exactly like the legacy system.
----------------------------------------------------------------
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]