-
Notifications
You must be signed in to change notification settings - Fork 19
feat: automate GCP Workload Identity via Config Connector IAMPolicyMember #102
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| # Release Notes: GCP Workload Identity automation via Config Connector | ||
|
|
||
| ## New Feature | ||
|
|
||
| ### What Changed | ||
| The operator now automatically creates Config Connector `IAMPolicyMember` | ||
| resources to bind Kubernetes service accounts to GCP service accounts via | ||
| Workload Identity. This is triggered when a RestateCluster has the | ||
| `iam.gke.io/gcp-service-account` annotation in `serviceAccountAnnotations`. | ||
|
|
||
| The GCP project ID is extracted from the service account email | ||
| (`name@PROJECT.iam.gserviceaccount.com`), so no additional configuration | ||
| is needed beyond the annotation that the control plane already sets. | ||
|
|
||
| A canary job validates that Workload Identity credentials are available | ||
| before allowing the StatefulSet to proceed, preventing Restate from starting | ||
| without GCS access. | ||
|
|
||
| This mirrors the existing AWS Pod Identity Association pattern. | ||
|
|
||
| ### Why This Matters | ||
| Previously, the IAM binding for Workload Identity had to be created manually | ||
| via `gcloud` commands each time a new environment was provisioned. This | ||
| automates that step, bringing GCP to parity with the existing AWS automation. | ||
|
|
||
| ### Impact on Users | ||
| - **Existing deployments**: No impact. The feature only activates when | ||
| `iam.gke.io/gcp-service-account` is present in `serviceAccountAnnotations`. | ||
| - **GCP deployments using this annotation**: Config Connector must be installed | ||
| on the GKE cluster. If the `IAMPolicyMember` CRD is not available, the | ||
| operator sets a `NotReady` status condition with a clear message rather | ||
| than crashing. | ||
| - **AWS deployments**: No impact. The canary job infrastructure was refactored | ||
| to share code between AWS and GCP, but behavior is unchanged. | ||
|
|
||
| ### Migration Guidance | ||
| No migration needed. To use this feature: | ||
|
|
||
| 1. Install Config Connector on the GKE cluster | ||
| 2. Ensure the Config Connector service account has `roles/iam.serviceAccountAdmin` | ||
| on the target GCP service account | ||
| 3. Set `serviceAccountAnnotations` on the RestateCluster: | ||
|
|
||
| ```yaml | ||
| spec: | ||
| security: | ||
| serviceAccountAnnotations: | ||
| iam.gke.io/gcp-service-account: restate@my-project.iam.gserviceaccount.com | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
PodIdentityAssociation RBAC is conditional on
.Values.awsPodIdentityAssociationCluster. Is it worth introducing a similar flag (e.g.,.Values.gcpConfigConnector) for GCP? I believe the rules are harmless when the CRD doesn't exist so this is largely cosmetic.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 did test that it was harmless and therefore left it in. but you're right we should do the same.