Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion to enable modern ServiceAccount json configuration in gcloud plugin #3250

Open
jandragsbaek opened this issue Mar 18, 2019 · 3 comments

Comments

@jandragsbaek
Copy link

Looking at /plugins/gcloud/app/controllers/gke_clusters_controller.rb#41, the CLOUDSDK_CONTAINER_USE_CLIENT_CERTIFICATE variable is hardcoded to True (ignoring any ENV currently set with the same name), which seems to be primarily be used for the P12 style of authenticating services to GCP.

The newer style embeds the certificate in a json file and needs to set this variable to False, in order for this to work. Or that seems to be the case for my experimentation.

Therefore I'd like to suggest allowing to set this via ENV. Default behaviour could be having this value set to true, in order to be backwards compatible with anyone using it.

Additionally, would it be possible to see an example on how it is recommended to embed (and enable) these kinds of credentials into the container? I'd love to see how you guys do it, as inspiration to better my own ways.

@grosser
Copy link
Contributor

grosser commented Mar 18, 2019

flag is coming from #2550 which has some vague details on why it was needed ... more details in kubernetes/kubernetes#30617

Make a PR that sets it to whatever "GKE_CREDENTIALS_USE_CLIENT_CERTIFICATE" env var is set to.
It's easy for any existing user to add that before deploying a new version.

... I'd prefer not to support/set it globally since there are lots of gcloud commands that it could impact ... unless that is what you want ... then the PR should add the flag to whitelist_env for all of them.

@grosser
Copy link
Contributor

grosser commented Apr 4, 2019

we now have #3307 which allows storing config in the database directly ... does this solve your issue too ?
... maybe we only need to add a little to make it work ?

/cc @KJTsanaktsidis @jonmoter

@grosser
Copy link
Contributor

grosser commented Apr 4, 2019

@KJTsanaktsidis said json keys are good .. so adding an extra column for that would be a good PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants