Open faraonc opened 2 years ago
Workload Identity works for me with watermill v1.3.5 and watermill-googlecloud v1.1.0. I struggled a bit but managed to make it work.
The service account was created in GCP with proper permissions (I don't know more details since it was the DevOps teams that did that for me).
I have added a kind: ServiceAccount
and annotation iam.gke.io/gcp-service-account
to my service-account.yaml helm chart template. Also in the deployment spec I specify the service account name serviceAccountName:
Can't share code details unfortunately.
Overview
I was hoping I can leverage GKE Workload Identity instead of generating the service account keys via a JSON file.
I gave it a shot today, but it seems like
GOOGLE_APPLICATION_CREDENTIALS
is the only way to get it to work. I was hoping I can get away with something like assigning aserviceAccountName
for my podHow I expect to setup GKE Workload Identity with Google Pub/Sub
Create a topic
Create a service account for publisher called
gcp-publisher-test
in thedefault
namespaceCreate a Deployment or pod in the
default
namespace that uses the service accountgcp-publisher-test