How to use workload identity federation (GCP) with go-conatinerregistry?

66 views Asked by At

I have a service (written in Golang) running in Kubernetes in an AWS environment. I have to access images in a GAR repo. I have setup a Workload Identity Pool (WIP) in GCP and authenticated my entire AWS account to it. In the service I am using go-containerregistry for loading images. The issue is I am not able to understand how to fetch the token from WIP and pass it to go-containerregistry to pull images. Any help appreciated here. Code in Go.

I tried to pass the client.Option (the same way we do for GCP clients )but there is no place to pass it in go-containerregistry.

0

There are 0 answers