repocho commented on a change in pull request #17537:
URL: https://github.com/apache/airflow/pull/17537#discussion_r689077597
##########
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:
Hello, thanks for the suggestion, but I think doing that will be less
clear because it will be something like this:
```
merged_init_container_spec = extend_object_field(
base_spec,
client_spec,
'init_containers')
merged_volume_spec = extend_object_field(
base_spec,
merged_init_container_spec,
'volumes')
return merge_objects(base_spec, merged_volume_spec)
```
My idea was that you have a `base_spec`, a `client_spec` and you get a
`merged_spec` extending both volumes and init_containers. Finally, you merge
the object, by overwriting the `base_spec` with the `merged_spec`.
But please, let me know if you see it differently or you have a better
approach.
--
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]