mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Kubeconfigs as file references (#466)
Signed-off-by: Jussi Nummelin <jussi.nummelin@gmail.com> Co-authored-by: Lauri Nevala <lauri.nevala@gmail.com> Co-authored-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
23 files changed
+272
-162
No files matched your search
@@ -6,10 +6,10 @@ const state = {
|
||||
}
|
||||
|
||||
const actions = {
|
||||
reloadAvailableKubeContexts: ({commit}) => {
|
||||
reloadAvailableKubeContexts({commit}, file) {
|
||||
let kc = new k8s.KubeConfig();
|
||||
try {
|
||||
kc.loadFromDefault();
|
||||
kc.loadFromFile(file);
|
||||
} catch (error) {
|
||||
console.error("Failed to read default kubeconfig: " + error.message);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user