jedcunningham commented on a change in pull request #17537:
URL: https://github.com/apache/airflow/pull/17537#discussion_r689592667



##########
File path: docs/apache-airflow/executor/kubernetes.rst
##########
@@ -113,7 +113,7 @@ create a V1pod with a single container, and overwrite the 
fields as follows:
     :start-after: [START task_with_volume]
     :end-before: [END task_with_volume]
 
-Note that volume mounts, environment variables, ports, and devices will all be 
extended instead of overwritten.
+Note that volume mounts, environment variables, ports, and devices will all be 
extended instead of overwritten. Note also that the volumes and the 
init_containers from the spec will be extended.

Review comment:
       Good call. I'd just add these 2 to the first list though? I don't think 
we need it separate?

##########
File path: airflow/kubernetes/pod_generator.py
##########
@@ -287,7 +287,8 @@ def reconcile_specs(
             client_spec.containers = PodGenerator.reconcile_containers(
                 base_spec.containers, client_spec.containers
             )
-            merged_spec = extend_object_field(base_spec, client_spec, 
'volumes')
+            merged_spec = extend_object_field(base_spec, client_spec, 
'init_containers')
+            merged_spec = extend_object_field(base_spec, merged_spec, 
'volumes')

Review comment:
       I'm looking at `extend_object_field`'s use in `reconcile_metadata`, 
maybe it'd be more clear like this:
   
   ```
               extend_object_field(base_spec, client_spec, 'init_containers')
               extend_object_field(base_spec, client_spec, 'volumes')
               return merge_objects(base_spec, client_spec)
   ```




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