-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Enables an existing GSA to be used when setting up Workload Identity #955
Enables an existing GSA to be used when setting up Workload Identity #955
Conversation
Thanks for the PR! 🚀 |
Description first, as acts as documentation. Default last, as optional.
@morgante I think all the changes you requested have been made now. The resulting module plans fine for me locally. I'm not sure why the |
@jackwhelpton Here's the error:
|
Thanks! I should have resolved that (using I ran through the instructions for running tests locally, but owing to our organization restrictions it'd be preferable for me to use a service account in an existing project rather than having the test setup automatically create a new project. I've tried doing that, but end up getting further non-related errors, things like:
Given all that, it'd certainly be easier if I can just have the CI process run these tests for me. |
@jackwhelpton If you've having trouble setting up a test environment, this codelab might help: https://codelabs.developers.google.com/codelabs/cft-onboarding/#9 Unfortunately it's impossible for us to expose Cloud Build logs publicly. One other option for debugging is to just try Here's the latest failure:
|
Ta. I'm discussing with our ops team at the moment about creating a sandbox environment where we can use the integration test suite more as intended. In the meantime, I've addressed that most recent error and it seems like all the tests pass now. Any further changes I should make? Feel free to squash these commits when you merge, I'm not sure much of this history is particularly edifying for others! |
Thanks for working through this. We're also working on a new test framework which should hopefully make contributions a bit easier. |
I know this is merged, but saw there was a slight problem with the renaming of
I'd assumed that the change to |
Yes they may change, but we try to minimize it whenever possible and if necessary add docs with helper commands (like
I believe so, since technically when we use |
Thanks for those clarifications. I knew writing, e.g. If I'd known that in advance, I wouldn't have done that rename, so fully agree with reverting it: the consistency between GSA and KSA names isn't worth the added update pain. Cheers for fixing the resulting mess too :) |
Resolves #956.
The workload-identity module currently allows for reusing an existing KSA, but not an existing GSA. This is a common requirement for us: typically, we will have two clusters within the same project (for example, a production cluster and a disaster recovery cluster), and want to configure KSAs in each cluster that are bound to the same GSA.
With the existing module, this isn't possible, as errors are thrown owing to the attempt to recreate an existing GSA.
This is a work-in-progress: I believe it's feature complete, but I'm still testing.