-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Gke service account generator #3914
Gke service account generator #3914
Conversation
bf25938
to
8b4cabd
Compare
@natasha41575 asked me to comment in kubernetes-sigs/cli-experimental#158 One issue we face is that GKE service accounts are a resource that requires the project, which isn't known until the final aggregation of manifests. So I think this solves that well, because the project can be patched in once at the final aggregation. It doesn't solve the general problem though, IIUC; here's another example: GoogleCloudPlatform/k8s-config-connector#271. (this is no longer be an issue for us, since we don't use the tool, though we'd like to at some point) There are also a couple of other areas where we'd like to be able to patch arbitrary strings; to the extent that's possible without complicating the very nice abstractions that kustomize offers. |
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.
this is going to be very useful!
api/krusty/gkesagenerator_test.go
Outdated
resources: | ||
- resource.yaml | ||
|
||
gkeSaGenerator: |
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'd say put all the effort into the filter test for now.
and/or drive this via the generators
field e.g.
- chartinflatorplugin_test.go
- inlinetransformer_test.go
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.
Given that this is cloud-provider-specific, does it need to be a top-level field, or could we make it generators-only? Is there a need for a similar generator for other cloud providers? Are the inputs required similar enough to share an abstraction? If not will we accept a bunch of top-level fields?
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.
8b4cabd
to
5a2a770
Compare
@monopole I've updated this PR based on your comments I would like to update this generator to add GKE resources such as |
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.
/lgtm
great start!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: monopole, natasha41575 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This PR implements a generator for GKE service accounts.
It is based on the resource in step 6 of "Authenticating to Google Cloud" here: https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity#yaml
ALLOW_MODULE_SPAN