-
Notifications
You must be signed in to change notification settings - Fork 287
Description
Describe the feature or resource
We would like to set up Workload Identity from inside Kubernetes (GKE) so that installing the same application in K8s multiple times in the same or different clusters (in the same project) GCP resources names created don't collide. In this case, problematic resources are service accounts created using Config Connector.
Importance
A concrete example: Let's say we have a service named "foo" that requires roles/pubsub.subscriber
in the GCP project nord-foo
. For this we have to set up Workload Identity so that we create a GCP service account, which we assign the role roles/pubsub.subscriber
and then configure Workload Identity policy for that GCP service account and the service account inside K8s (KSA). If we wanted to deploy that application e.g. on the same cluster in multiple namespaces we would like that a different GCP service account is always created and assigned that role and everything needed. We would also like it to work if we deploy that application in a different cluster on the same GCP project, it's basically the same thing.
If we reuse the service account (SA) then if the SA is created with one of the Helm charts and that chart is installed with two different releases (or in two different namespaces) if one chart gets uninstalled the SA could be deleted and the remaining chart will not function.
The end goal is to be able to do everything inside GKE, so that we don't have to combine Terraform and other tools to deploy our apps. We would like to be able to create a random SA name as we see happen when we create it in the console.