ashb commented on a change in pull request #6230: [AIRFLOW-5413] Allow K8S 
worker pod to be configured from JSON/YAML file
URL: https://github.com/apache/airflow/pull/6230#discussion_r377716910
 
 

 ##########
 File path: airflow/kubernetes/pod_generator.py
 ##########
 @@ -445,12 +424,31 @@ def construct_pod(
             name=pod_id
         ).gen_pod()
 
-        # Reconcile the pod generated by the Operator and the Pod
-        # generated by the .cfg file
-        pod_with_executor_config = PodGenerator.reconcile_pods(worker_config,
-                                                               
kube_executor_config)
-        # Reconcile that pod with the dynamic fields.
-        return PodGenerator.reconcile_pods(pod_with_executor_config, 
dynamic_pod)
+        # Reconcile the pods starting with the first chronologically,
+        # Pod from the airflow.cfg -> Pod from executor_config arg -> Pod from 
the K8s executor
+        pod_list = [worker_config, kube_executor_config, dynamic_pod]
+
+        return reduce(PodGenerator.reconcile_pods, pod_list)
+
+    @staticmethod
+    def deserialize_model_file(path: str) -> k8s.V1Pod:
+        """
+        :param path: Path to the file
+        :return: a kubernetes.client.models.V1Pod
+
+        Unfortunately we need access to the private method
+        `_ApiClient__deserialize_model` from the kubernetes client.
 
 Review comment:
   ```suggestion
           ``_ApiClient__deserialize_model`` from the kubernetes client.
   ```

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


With regards,
Apache Git Services

Reply via email to