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

Config load path must be tracked #167

Open
kke opened this issue Sep 17, 2019 · 1 comment
Open

Config load path must be tracked #167

kke opened this issue Sep 17, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@kke
Copy link
Contributor

kke commented Sep 17, 2019

Any relative file references are supposed to be searched for under the directory of the kubeconfig file that defined the reference.

client-go uses filepath.isAbs(), the javascript lib uses path.isAbsolute(). k8s-client should probably use the Pathname#absolute? to build the final path.

For example when merging kubeconfigs, the origin of each entry must be tracked so the reference can be resolved later.

@kke kke added the bug Something isn't working label Sep 17, 2019
@kke
Copy link
Contributor Author

kke commented Sep 18, 2019

Actually it does not resolve exec command paths the same way:

https://github.com/kubernetes/client-go/blob/611184f7c43ae2d520727f01d49620c7ed33412d/tools/clientcmd/loader.go#L579

But the issue is still relevant for the relative certificate paths etc. The load location must be tracked and in case the command has path separators, and is not absolute?, the load origin must be known.

@kke kke changed the title Exec/auth provider command path inconsistent with go/js Config load path must be tracked Sep 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant