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

fix: Add check before activating service accounts in Kaniko build jobs #358

Conversation

deadlycoconuts
Copy link
Contributor

@deadlycoconuts deadlycoconuts commented Aug 15, 2023

Context

With the changes in PR #357, there is a need to make additional changes to the Dockerfiles of the Kaniko image building templates - instead of authenticating immediately with GOOGLE_APPLICATION_CREDENTIALS, we now first check if that env var is defined, if so we will authenticate with the credentials stored in the file path pointed to by that env var; otherwise, the gcloud auth activate-service-account will not be run in the Dockerfile. In the second scenario, the Google service account credentials are expected to be passed to the Kaniko image building jobs via a mounted Kubernetes service account.

A similar change has been implemented in Merlin: https://github.com/caraml-dev/merlin/pull/352/files#diff-931d889c572814da3e253178b316471ac9878c45bf0497dd1792b5442eab359cR24

@deadlycoconuts deadlycoconuts added the type: bug Something isn't working label Aug 15, 2023
@deadlycoconuts deadlycoconuts self-assigned this Aug 15, 2023
@deadlycoconuts deadlycoconuts marked this pull request as ready for review August 15, 2023 09:29
Copy link
Collaborator

@krithika369 krithika369 left a comment

Choose a reason for hiding this comment

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

Thanks for this fix! LGTM.

@deadlycoconuts
Copy link
Contributor Author

Thanks for the quick review! :D Merging this now!

@deadlycoconuts deadlycoconuts merged commit 78ca7b3 into caraml-dev:main Aug 16, 2023
12 checks passed
@deadlycoconuts deadlycoconuts deleted the add_conditional_gcloud_sa_activation branch September 7, 2023 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants