Skip to content

Conversation

@Chen-Oliver
Copy link
Contributor


HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"pods \"extract-57f0f8f6590045d59eb2d36ce2bacb53\" is forbidden: error looking up service account airflow/airflow-worker: serviceaccount \"airflow-worker\" not found","reason":"Forbidden","details":{"name":"extract-57f0f8f6590045d59eb2d36ce2bacb53","kind":"pods"},"code":403}
WARNING - ApiException when attempting to run task, re-queueing. Reason: 'Forbidden'. Message: pods "extract-57f0f8f6590045d59eb2d36ce2bacb53" is forbidden: error looking up service account airflow/airflow-worker: serviceaccount "airflow-worker" not found

When using the KubernetesExecutor as part of LocalKubernetesExecutor, it will fail due to a missing worker service account. This PR fixes that issue. Have tested this fix on the latest helm chart version.

^ 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 newsfragments.

@boring-cyborg boring-cyborg bot added the area:helm-chart Airflow Helm Chart label Jan 9, 2023
@boring-cyborg
Copy link

boring-cyborg bot commented Jan 9, 2023

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
Here are some useful points:

  • Pay attention to the quality of your code (flake8, mypy and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@Chen-Oliver Chen-Oliver force-pushed the localkubeexec_sa_fix branch from c298f14 to 7966c7a Compare January 9, 2023 20:34
@jedcunningham
Copy link
Member

Thanks @Chen-Oliver. Can you add some test coverage for the various executor options here as well?

@Chen-Oliver
Copy link
Contributor Author

Thanks @Chen-Oliver. Can you add some test coverage for the various executor options here as well?

I've added a simple test, hopefully it is sufficient :)

@potiuk potiuk force-pushed the localkubeexec_sa_fix branch from 7ad6c5d to 5ab6286 Compare January 10, 2023 22:20
@potiuk
Copy link
Member

potiuk commented Jan 10, 2023

rebased to account for doc failure fixed in main

@jedcunningham jedcunningham merged commit 8f933c9 into apache:main Jan 10, 2023
@boring-cyborg
Copy link

boring-cyborg bot commented Jan 10, 2023

Awesome work, congrats on your first merged pull request!

@jedcunningham
Copy link
Member

Thanks @Chen-Oliver! Congrats on your first commit 🎉

@jedcunningham jedcunningham added the type:bug-fix Changelog: Bug Fixes label Jan 10, 2023
@Chen-Oliver Chen-Oliver deleted the localkubeexec_sa_fix branch January 11, 2023 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:helm-chart Airflow Helm Chart type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants