mik-laj commented on pull request #16945:
URL: https://github.com/apache/airflow/pull/16945#issuecomment-879035322


   What do you think about moving PodLauncher initialization to the new method?
   ```python
   def create_pod_launcher(self):
         return pod_launcher.PodLauncher(kube_client=client, 
extract_xcom=self.do_xcom_push)
   ```
   This will allow us to overwrite this code by class inheritance:
   ```python
   class CustomKubernetesPodOperatorWithCustomLauncher(KubernetesPodOperator):
       def __init__(self, arg1, **kwargs);
           super().__init__(**kwargs)
           self.arg1 = arg1
       def create_pod_launcher(self)
           return MyPodLauncher(kube_client=client, 
extract_xcom=self.do_xcom_push, custom_argument=self.arg1)
   ```
   Additionally, we will be able to add our own arguments to the constructor.
   


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to