Skip to content
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

Render a pod spec using the pod_template_file override, if passed to the executor #46374

Merged
merged 1 commit into from
Feb 9, 2025

Conversation

brouberol
Copy link
Contributor

If a task was created by a custom executor_options['pod_template_file'] option, we make sure to render the TaskInstance's associated k8s_pod_spec with this specific pod_template_file, to avoid seeing discrepancies between the spec visible in airflow and the one deployed to Kubernetes.

After having deployed this patch to my test instance running in our Kubernetes cluster, the 2 fields that were missing from the K8s Pod Spec pane were now visible (namely, the kubeapi_enabled label in the following screenshot).

Screenshot 2025-02-03 at 12 43 40

closes: #46373


@boring-cyborg boring-cyborg bot added area:providers provider:cncf-kubernetes Kubernetes provider related issues labels Feb 3, 2025
@brouberol brouberol force-pushed the issue-46373 branch 3 times, most recently from 562f04f to 01bb5ab Compare February 3, 2025 14:42
@brouberol brouberol changed the title Render a pod spec using the pod_template_file override, if passed to the executor Render a pod spec using the pod_template_file override, if passed to the executor Feb 3, 2025
@brouberol brouberol force-pushed the issue-46373 branch 2 times, most recently from 8d34bab to 1f71b35 Compare February 3, 2025 15:16
Copy link
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks good to me but I'd love others (@hussein-awala ?) to take a look?

Copy link
Contributor

@nevcohen nevcohen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about updating the documentation? Like in pod_override here.

@brouberol brouberol force-pushed the issue-46373 branch 3 times, most recently from dba7c1d to b3ba3ef Compare February 7, 2025 16:43
@brouberol
Copy link
Contributor Author

What about updating the documentation? Like in pod_override here.

The documentation is actually quite good there! I did add a mention related to the non default pod_template_file being used to render the K8s Pod Spec though. Thanks for the suggestion!

…the executor

If a task was created by a custom `executor_options['pod_template_file']` option,
we make sure to render the `TaskInstance`'s associated `k8s_pod_spec`
with this specific `pod_template_file`, to avoid seeing discrepancies
between the spec visible in airflow and the one deployed to Kubernetes.

Signed-off-by: Balthazar Rouberol <[email protected]>
@eladkal eladkal merged commit 1b668c3 into apache:main Feb 9, 2025
71 checks passed
vargacypher pushed a commit to vargacypher/airflow that referenced this pull request Feb 9, 2025
…sed to the executor (apache#46374)

If a task was created by a custom `executor_options['pod_template_file']` option,
we make sure to render the `TaskInstance`'s associated `k8s_pod_spec`
with this specific `pod_template_file`, to avoid seeing discrepancies
between the spec visible in airflow and the one deployed to Kubernetes.

Signed-off-by: Balthazar Rouberol <[email protected]>
@brouberol brouberol deleted the issue-46373 branch February 10, 2025 10:05
ambika-garg pushed a commit to ambika-garg/airflow that referenced this pull request Feb 17, 2025
…sed to the executor (apache#46374)

If a task was created by a custom `executor_options['pod_template_file']` option,
we make sure to render the `TaskInstance`'s associated `k8s_pod_spec`
with this specific `pod_template_file`, to avoid seeing discrepancies
between the spec visible in airflow and the one deployed to Kubernetes.

Signed-off-by: Balthazar Rouberol <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:providers provider:cncf-kubernetes Kubernetes provider related issues
Projects
None yet
4 participants