kubernetes / cloud-provider-gcp

cloud-provider-gcp contains several projects used to run Kubernetes in Google Cloud
Apache License 2.0
111 stars 202 forks source link

`gke-gcloud-auth-plugin`: Support passing credentials via a specific JSON filepath #654

Open Lawouach opened 4 months ago

Lawouach commented 4 months ago

Hi all,

Today, when you use google-cloud-sdk-gke-gcloud-auth-plugin you can rely on GOOGLE_APPLICATION_CREDENTIALS via the --use_application_default_credentials flag. However, the GOOGLE_APPLICATION_CREDENTIALS is explicitely forbidden to be set in a Cloud Run by the documentation https://cloud.google.com/run/docs/securing/service-identity.

This means if you try to create a Cloud Run job that needs to connect to a GKE cluster, you have to either dismiss the documentation warning or find a way to manually create the kubeconfig with all the information.

Would it be possible to add a flag such as `--application_default_credentials_file which, when not set, would default to the usual places, but when set would pick up the file.

k8s-ci-robot commented 4 months ago

This issue is currently awaiting triage.

If the repository mantainers determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
BenTheElder commented 2 months ago

/retitle gke-gcloud-auth-plugin: Support passing credentials via a specific JSON filepath