Skip to content

Conversation

@DjVinnii
Copy link
Contributor

@DjVinnii DjVinnii commented May 5, 2025

The KubernetesPodOperator did not allow for overriding the automountServiceAccount token field when creating pods. By default this will mount the API token for the Service Account, which might be prohibited by for example OPA policies. This PR allows the override of this setting, but still keeping the default behavior.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an 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 a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@boring-cyborg boring-cyborg bot added area:providers provider:cncf-kubernetes Kubernetes (k8s) provider related issues labels May 5, 2025
@eladkal eladkal force-pushed the KPO-configurable-automountServiceAccountToken branch from 2e72080 to 2c721c4 Compare May 11, 2025 06:03
@eladkal eladkal requested a review from romsharon98 May 11, 2025 06:03
@eladkal
Copy link
Contributor

eladkal commented May 11, 2025

@DjVinnii can you fix the failing tests?

@DjVinnii
Copy link
Contributor Author

@DjVinnii can you fix the failing tests?

Sure, looking at it!

@eladkal eladkal merged commit 40216ef into apache:main May 11, 2025
76 checks passed
@DjVinnii DjVinnii deleted the KPO-configurable-automountServiceAccountToken branch May 12, 2025 18:22
sanederchik pushed a commit to sanederchik/airflow that referenced this pull request Jun 7, 2025
…erator (apache#50223)

* Add configurable automountServiceAccountToken

* fix spell check

* Update Kubernetes Tests with automountServiceAccountToken

---------

Co-authored-by: Elad Kalif <45845474+eladkal@users.noreply.github.com>
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 (k8s) provider related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants