-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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 Examples and documentation for pod_template_file feature #10916
Add Examples and documentation for pod_template_file feature #10916
Conversation
042ba02
to
32a5054
Compare
docs/executor/kubernetes.rst
Outdated
pod_template_file | ||
################# | ||
|
||
As of Airflow 1.10.12, users can now use a pod_template_file setting in their airflow.cfg to form the basis of |
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.
As of Airflow 1.10.12, users can now use a pod_template_file setting in their airflow.cfg to form the basis of | |
As of Airflow 1.10.12, users can now use a ``pod_template_file`` option in ``XXX`` section in their airflow.cfg to form the basis of |
docs/executor/kubernetes.rst
Outdated
their KubernetesExecutor pods. This process is faster and easier to modify. | ||
|
||
We include multiple examples of working pod operators below, but we would also like to explain a few necessary components | ||
if you want to customize your pod_template_files. As long as you have these components, every other element |
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.
if you want to customize your pod_template_files. As long as you have these components, every other element | |
if you want to customize your Pod template files. As long as you have these components, every other element |
docs/executor/kubernetes.rst
Outdated
|
||
Airflow uses the ``pod_template_file`` by making certain assumptions about the structure of the template. | ||
When airflow creates the worker pod's command, it assumes that the airflow worker container part exists | ||
at the beginning of the container array. It then assumes that the container is named "base" |
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.
at the beginning of the container array. It then assumes that the container is named "base" | |
at the beginning of the container array. It then assumes that the container is named ``"base"`` |
docs/executor/kubernetes.rst
Outdated
It's important to note while Airflow overwrites these fields, they **can not be left blank**. | ||
If these fields do not exist, kubernetes can not load the yaml into a Kuberentes V1Pod | ||
|
||
2. Each airflow ``pod_template_file`` must have a container named ``base`` at the ``pod.spec.containers[0]`` position |
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.
2. Each airflow ``pod_template_file`` must have a container named ``base`` at the ``pod.spec.containers[0]`` position | |
2. Each airflow ``pod_template_file`` must have a container named ``"base"`` at the ``pod.spec.containers[0]`` position |
docs/executor/kubernetes.rst
Outdated
Airflow uses the ``pod_template_file`` by making certain assumptions about the structure of the template. | ||
When airflow creates the worker pod's command, it assumes that the airflow worker container part exists | ||
at the beginning of the container array. It then assumes that the container is named "base" | ||
when it merges this pod with internal configs. Users are more than welcome to create |
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.
when it merges this pod with internal configs. Users are more than welcome to create | |
when it merges this pod with internal configs. You are more than welcome to create |
See:
https://developers.google.com/style/person
and
Address the reader directly. Use you, instead of the user or they. For more information, see Second person and first person.
32a5054
to
a5b1d47
Compare
Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
airflow/kubernetes_executor_templates/dags_in_image_template.yaml
Outdated
Show resolved
Hide resolved
…rflow into pod_template_file_examples
hmm tests are failing |
|
@kaxil forgot an |
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.
Needs updating PR description. The current one says it is cherry-picked from a commit that does not belong to this repo
@kaxil fixed |
Add more documentation on creating and modifying a pod_template_file for users of the KubernetesExecutor
^ 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.