-
Notifications
You must be signed in to change notification settings - Fork 273
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
feat(k8s): add service account and irsa support for in-cluster-builder #3384
Conversation
b733634
to
fff9644
Compare
a79e55b
to
da9bebd
Compare
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.
Thanks, great job! 💪 I've left a few comments and questions, please check.
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.
Reviewed the docs! Thanks for implementing this, this is super useful!
I have two suggestions concerning the structure of the docs as they contain significantly more content now than before:
- Split into documentation about pulling images and pushing images.
- For pushing images, keep the existing docs on how to allow all nodes to push to ECR and display using IRSA as an improved and recommended alternative.
docs/guides/in-cluster-building.md
Outdated
buildMode: kaniko | ||
kaniko: | ||
serviceAccountAnnotations: | ||
eks.amazonaws.com/role-arn: arn:aws:iam::<account-id>:role/<web-identity-role-name> |
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.
So nice 🎉
Dismissing Annas review, because she's on vacation until next year and I implemented her suggestions
This PR solves an issue we're having as well. Any chance this will make the next release? |
@jamesloosli I absolutely want to finish this but we won't make it before the 0.13 release (will happen this month). |
Changed the base back to main, as this would need to land in main and not 0.12 |
1 similar comment
Changed the base back to main, as this would need to land in main and not 0.12 |
@highb right now we are focused on bug fixes and stability improvements– but this is definitely something I want to look back into in the coming months. |
Picking this up again now and also making sure this works with GCP workload identity for the in-cluster builders as well. |
c9c994e
to
436a8b2
Compare
log, | ||
}) | ||
// Both annotations should be present | ||
expect(isEqualAnnotations(originalServiceAccount, status.remoteResources[0])) |
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.
I'm not sure if expect will actually fail if you do not explicitly assert for true
expect(isEqualAnnotations(originalServiceAccount, status.remoteResources[0])) | |
expect(isEqualAnnotations(originalServiceAccount, status.remoteResources[0])).to.be.true |
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.
We should install https://www.npmjs.com/package/eslint-plugin-chai-expect
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.
Fixed the missing assertions, but will create a new PR for adding the chai expect linter plugin because some existing tests fail the new linter rules.
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.
Looks good to me 👍
@@ -2,6 +2,6 @@ kind: Module | |||
type: container | |||
name: skopeo | |||
description: Used by the kubernetes provider for interacting with container registries within a cluster | |||
image: gardendev/skopeo:1.41.0-3 | |||
image: gardendev/skopeo:1.41.0-4 |
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.
We do not seem to reference this image from Garden, but this can be cleaned up in a separate PR
Addressed all comments, could you take a look again @vvagaytsev ? |
What this PR does / why we need it:
This PR introduces a new service account, and makes the annotations
configurable in kaniko and buildkit in-cluster-builders.
This change enables the use of IRSA for in-cluter-building which makes
in-cluster building more secure.
Which issue(s) this PR fixes:
Fixes #2931
Special notes for your reviewer: