-
Notifications
You must be signed in to change notification settings - Fork 16.6k
Description
Description
Currently the reconcile_specs method in pod_generator.py is resposible for merging the executor_config's pod_override client_pod and the base_pod. It successfully overrides the base container resposible for k8 executor worker pod execution. But when you try to override an existing init_container then instead of merging with the pod override init_container, it fails as it tries to create a duplicate name init_container. This happens because there is no merging logic for init_containers in the pod generator.
Use case/motivation
Executor Config should allow overriding existing init containers.
Use case:
k8 executor, multinamespace mode Airflow using gitsync with submodules - the helm chart configures the same git sync configuration for all airflow components - dag processor, worker etc. But this does not need to be: the dag processor needs to see the dags from all git submodules to import all dags. But a k8 worker only needs one specific submodule. If i can override the init container in the worker using executor_config using airflow cluster policies then i can dynamically set which repo the worker git sync needs and then it is much faster checking out the specific submodule repo rather than the full repo with all the submodules.
Related issues
No response
Are you willing to submit a PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct