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

Pass in a kubernetes config location to load #189

Closed
lholmquist opened this issue Jan 21, 2020 · 0 comments · Fixed by #190
Closed

Pass in a kubernetes config location to load #189

lholmquist opened this issue Jan 21, 2020 · 0 comments · Fixed by #190

Comments

@lholmquist
Copy link
Member

This issue is for adding the ability to pass in a location for a configuration file. The kubernetes client that drives this library, has a loadFromFile method that can be used.
From the readme: https://github.com/godaddy/kubernetes-client#initializing

const { KubeConfig } = require('kubernetes-client')
const kubeconfig = new KubeConfig()
kubeconfig.loadFromFile('~/some/path')
const Request = require('kubernetes-client/backends/request')

const backend = new Request({ kubeconfig })
const client = new Client({ backend, version: '1.13' })

I think we can re-use the settings.config object that is already being passed in and make it multi-use. It can be an object, which it already is, or it can be a string, which would be a new config location and we can load that with the "loadFromFile" method

lholmquist added a commit to lholmquist/openshift-rest-client that referenced this issue Jan 21, 2020
This adds the ability to pass in a string value for `settings.config`, which points to the location of a kubernetes/optionshift config

fixes nodeshift#189
lholmquist added a commit that referenced this issue Jan 21, 2020
* feat: load config from a file location.

This adds the ability to pass in a string value for `settings.config`, which points to the location of a kubernetes/optionshift config

fixes #189
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 a pull request may close this issue.

1 participant