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

Doesn't handle multipule kube-config files #3

Closed
switchboardOp opened this issue Sep 24, 2019 · 3 comments
Closed

Doesn't handle multipule kube-config files #3

switchboardOp opened this issue Sep 24, 2019 · 3 comments

Comments

@switchboardOp
Copy link

switchboardOp commented Sep 24, 2019

I work with more than one cluster, so I set the KUBECONFIG environment variable to list of paths to configuration files as described here.

This causes doctor to panic.

panic: stat /Users/me/.kube/config:/Users/me/.kube/mini-kube-config:/Users/me/.kube/dev-kube-config:/Users/me/.kube/prod-kube-config: no such file or directory

goroutine 1 [running]:
github.com/emirozer/kubectl-doctor/pkg/client.tryGetKubeConfigFromEnvVar(0x50, 0xc0002c4e60, 0x1ebccc0)
	/Users/eoz/go/src/github.com/emirozer/kubectl-doctor/pkg/client/client.go:66 +0x14d
github.com/emirozer/kubectl-doctor/pkg/client.InitClient(0xc0000b00c0)
	/Users/eoz/go/src/github.com/emirozer/kubectl-doctor/pkg/client/client.go:32 +0x34
github.com/emirozer/kubectl-doctor/pkg/plugin.init.0()
	/Users/eoz/go/src/github.com/emirozer/kubectl-doctor/pkg/plugin/cmd.go:45 +0x97

doctor should respect the merged config and the current context.

@emirozer
Copy link
Owner

Thanks for the report, you are right i didn't handle that case yet, will fix quite soon.

@emirozer
Copy link
Owner

Sorry for the late update...

dffa19a

will adress your issue and it is going in the next release

@emirozer
Copy link
Owner

https://github.com/emirozer/kubectl-doctor/releases/tag/0.3.0

I think i tested with enough scenarios, just in case if it is still troublesome for you feel free to reopen!

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