xEviL opened a new issue #9958: URL: https://github.com/apache/airflow/issues/9958
Airflow documentation on `KubernetesExecutor` and its configuration is missing documentation on how to use its most powerful configuration option: `pod_template_file`. While setting up a test Airflow system with `KubernetesExecutor` to match an existing system that doesn't use it, I found that I need to have do the following: - mount extra volumes for `worker` pods - mount secrets as files for `worker` pods - mount config maps as files for `worker` pods While current `kubernetes` configuration of Airflow does not allow these via specific options, I believe this should be possible to implement via `pod_template_file ` option, however it is not very clear how this mechanism works and what exactly to put into the pod template file. There's also a number of PRs adding new configuration features for `kubernetes` to Airflow's config, which may possibly be solved via a `pod_template_file`. And as pointed by @mik-laj [here](https://github.com/apache/airflow/pull/8150#issuecomment-662792653) adding/removing every possible k8s feature to Airflow's config is a huge maintenance burden. **Use case / motivation** Maybe these can be solved with just more docs. Would be great to have an overview of general configuration / override flow for the option `pod_template_file` for configuring workers for `KubernetesExecutor`. And a few examples of a valid worker pod template, because I'm not sure what has to be there and what not (like `spec.containers[].command`? or what will be injected and what is allowed - not obvious even after looking at the source code of executor / pod launcher). **Related Issues** Original PR introducing `pod_template_file`: https://github.com/apache/airflow/pull/6230 PRs that can are possibly not needed with the doc improved: https://github.com/apache/airflow/pull/7365 https://github.com/apache/airflow/pull/8150 P.S. After more digging I think another solution for my cases above could be using `airflow_local_settings.py` and pod mutation hook. Would be great to link to this from the config reference for k8s section. We also would like to use both `KubernetesExecutor` and `KubernetesPodOperator` - so we would need to distinguish the pods that these two launch with the hook. ---------------------------------------------------------------- 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]
