-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow passing config_path as a parameter to KubernetesExecutor #46293
Comments
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval. |
If you can take a look at propose a PR solving it, yes I think it would be useful. But it needs a deep look in the code whether it's possible, also with Airflow 3 changes / Task SDK changes in progress, likely doing it after this is completed, is a good idea. |
Are you sure you can rewrite it with?
I've dug through the code and also experimented a bit, and couldn't find any way to rewrite the initial config file for
|
I can solve this problem. kindly assign it to me |
Description
Currently, when using executor_config with KubernetesExecutor, the config_file path must be hardcoded. If we try to pass it dynamically using a Jinja template ("{{ params.config_path }}"), it results in an error.
Example of a working static configuration:
However, if we attempt to pass it dynamically, it fails:
This would be useful when deploying DAGs across different environments (e.g., multiple regions) without hardcoding paths.
Proposed Solution:
Modify executor_config to allow templating in KubernetesExecutor.config_file, similar to other templated parameters in Airflow.
Use case/motivation
This would be useful when deploying DAGs across different environments (e.g., multiple regions) without hardcoding paths.
Airflow should allow config_file to accept templated values, resolving them at runtime.
This feature would improve flexibility when running KubernetesExecutor tasks that need different configurations based on dynamic parameters.
Would love to hear thoughts from the community on this! Thanks! 😊
Related issues
This feature would improve Airflow’s flexibility in hybrid execution environments and align with the goals of AIP-61. Would love to hear thoughts from the community on this! 🚀
Are you willing to submit a PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: