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

feat: expose the current namespace on the config object #436

Conversation

lholmquist
Copy link
Contributor

This adds the current namespace to the return value of the fromKubeconfig function. I noticed this value is also returned in the getInCluster function.

In our openshift node client(nodeshift), we us the current namespace(project in openshift terms) the user is logged into. I can derive it from calling loadKubeconfig and then parsing the current context from the loaded config, but that makes an extra call to look up the configuration.

It is more of a convenience thing and i would hate to clutter the returned object, so wanted to see your thoughts

Thanks

Copy link
Contributor

@silasbw silasbw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sgtm, thanks for the PR 🏅

@silasbw silasbw merged commit d7e0688 into godaddy:master Apr 1, 2019
@lholmquist
Copy link
Contributor Author

Rad! thanks

@lholmquist lholmquist deleted the expose-namespace-current-context-from-kubeconfig branch April 1, 2019 16:10
@silasbw
Copy link
Contributor

silasbw commented Apr 1, 2019

Published with kubernetes-client@6.12.0

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

Successfully merging this pull request may close these issues.

None yet

2 participants