-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Add support to create airflow pools from chart values #15093
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
Add support to create airflow pools from chart values #15093
Conversation
* Pools can now be added throught the airflowPools value * Docs also updated in that regard Done in collaboration with @abrasseu @Jattakuy @JonathanCiglia @manzkel . Closes apache#11707
| args: | ||
| - "bash" | ||
| - "-c" | ||
| - 'airflow pools import {{ template "airflow_pools_path" . }}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| args: | |
| - "bash" | |
| - "-c" | |
| - 'airflow pools import {{ template "airflow_pools_path" . }}' | |
| args: | |
| - "airflow" | |
| - "pools" | |
| - "import" | |
| - {{ template "airflow_pools_path" . }} |
I think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm afraid that won't work with some Docker images. It's a similar problem to: #11129
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mik-laj are we good as is ? (there are several location in the charts where airflow is called through bash -c)
| set within the image, so you need to override it when deploying the chart. | ||
|
|
||
| .. | ||
| Uncomment before merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably do this then, shouldn't we :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! As mentionned in the PR description, I am having issues cross-referencing documentation and would need help here.
| Airflow Variables, Connections and Pools | ||
| ---------------------------------------- | ||
|
|
||
| Airflow variables and connections may be set directly with environment variables (see :ref:`apache-airflow:cli-and-env-variables-ref:_env_variables`). You can set them by using the chart values ``extraEnv``, or a combination of ``extraConfigMaps``/``extraSecrets`` and ``extraEnvFrom`` (see :doc:`Parameters reference <parameters-ref>`). You may also use a secret backend (**TODO, before merge. Need clarification: I am not familiar with this.**) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be helpful to add an example for lazy people showing how to set up an environment variable that uses a secret.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do.
| args: | ||
| - "bash" | ||
| - "-c" | ||
| - 'airflow pools import {{ template "airflow_pools_path" . }}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think to add support for Airflow 1.10.13? This version uses airflow pool --import command.
if airflow pools import --help; then
exec airflow pools import ....
else:
exec airflow pool --import ...
fiThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be doable, I haven't followed much the latest discussions arround the chart but out of curiosity when will the support for 1.10.x be dropped ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Chart, for now, will continue supporting 1.10.x too
FloChehab
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| args: | ||
| - "bash" | ||
| - "-c" | ||
| - 'airflow pools import {{ template "airflow_pools_path" . }}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mik-laj are we good as is ? (there are several location in the charts where airflow is called through bash -c)
| args: | ||
| - "bash" | ||
| - "-c" | ||
| - 'airflow pools import {{ template "airflow_pools_path" . }}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be doable, I haven't followed much the latest discussions arround the chart but out of curiosity when will the support for 1.10.x be dropped ?
| set within the image, so you need to override it when deploying the chart. | ||
|
|
||
| .. | ||
| Uncomment before merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! As mentionned in the PR description, I am having issues cross-referencing documentation and would need help here.
| Airflow Variables, Connections and Pools | ||
| ---------------------------------------- | ||
|
|
||
| Airflow variables and connections may be set directly with environment variables (see :ref:`apache-airflow:cli-and-env-variables-ref:_env_variables`). You can set them by using the chart values ``extraEnv``, or a combination of ``extraConfigMaps``/``extraSecrets`` and ``extraEnvFrom`` (see :doc:`Parameters reference <parameters-ref>`). You may also use a secret backend (**TODO, before merge. Need clarification: I am not familiar with this.**) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do.
|
Any progress on this feature? Looking forward to have it merged :) |
|
Hello there ! Best of luck ! |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
Hello @mik-laj,
I finally had time to look into #11707 ; for this issue I have introduced 4 of my soon-to-be ex-collaborators to this chart so maybe you will have new contributors (you should expect a bit less contributions from myself in the coming months).
Changes
Done in collaboration with @abrasseu @Jattakuy @JonathanCiglia @manzkel .
Closes #11707
Todos
I have left a couple of TODOs mostly in docs as I was having issues cross-referencing docs locally.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.