This repository has been archived by the owner on Jun 19, 2022. It is now read-only.
Include cluster name in k8s Service Account name for Workload Identity #715
Labels
area/security
kind/bug
Something isn't working
kind/good-first-issue
priority/1
Blocks current release defined by release/* label or blocks current milestone
release/1
Milestone
Describe the bug
When enable Workload Identity, reconciler will create a k8s Service Account, the k8s SA's name is the same as corresponding Google Cloud Service Account.
knative-gcp/pkg/reconciler/identity/resources/service_account.go
Line 31 in 45d9dbd
More details about reconciler logic for workload identity: https://github.com/google/knative-gcp/blob/master/docs/install/pubsub-service-account.md
It is better to make k8s SA use name like googleServiceAccount + cluster name.
We can use
cluster, _ := metadata.InstanceAttributeValue("cluster-name")
to get cluster name, and clusterName is also an optional value inObjectMeta
.Expected behavior
Include cluster name in k8s Service Account name for Workload Identity
The text was updated successfully, but these errors were encountered: