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

Parsing kube config file fails when GCP auth is missing cmd-args, cmd-path #325

Open
guyrotem opened this issue Oct 19, 2020 · 1 comment

Comments

@guyrotem
Copy link

calling skuber.api.Configuration.parseKubeconfigFile() throws an exception when kube config file has a GCP user without "cmd-args" and "cmd-path" (which are optional fields).

Error thrown: Caused by: java.util.NoSuchElementException: None.get.

cmdPath = valueAt(config, "cmd-path"),
cmdArgs = valueAt(config, "cmd-args")

I couldn't find the official documentation, but I have witnessed cases where gcloud CLI did not add these fields when importing a new user and I can confirm these contexts were working properly without them using kubectl (probably since "gcloud" is in my path).
Note that this exception will be thrown even when not attempting to access the malformed context.

Suggested solution: providing fallback values to GcpCommand - cmd-args: "config config-helper --format=json", cmd-path: "gcloud". WDYT?

@hagay3
Copy link
Contributor

hagay3 commented Jul 8, 2021

This repo seems to have been abandoned.
A maintained fork is available here
https://github.com/hagay3/skuber
Please open the issue in the new fork.

Thanks,
Hagai

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