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

Question: Why is the openshiftClient() expecting settings.config instead of just settings? #172

Closed
jtudelag opened this issue Oct 29, 2019 · 2 comments

Comments

@jtudelag
Copy link

Just a question, out of my curiosity:

Why is the openshiftClient({config: ..}) expecting a .config property inside the seetings object,
if that is not the standard structure of a kubeconfig generated by the kubernetes-client library?

Wouldnt be easier to just receive the object as it is, returned from by the library config.fromKubeconfig(path)?

Im pretty new to NodeJS so, don't be too hard ;)

config.fromKubeconfig(path);

[1] https://github.com/nodeshift/openshift-rest-client/blob/master/lib/openshift-rest-client.js#L62
[2] https://github.com/nodeshift/openshift-rest-client/blob/master/lib/openshift-rest-client.js#L72

@lholmquist
Copy link
Member

I think the reason was because if there were settings to pass in that didn't have anything to do with the actual kube config object, then we could keep those separate. At the moment, though it doesn't look like there are, but it makes it a little future proof

@lholmquist
Copy link
Member

closing, if you have any other questions, feel free to ask

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