Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

use options.KubeConfig to check if loading API is needed #1133

Merged
merged 2 commits into from Jul 20, 2020

Conversation

wwitzel3
Copy link
Contributor

Signed-off-by: Wayne Witzel III <wayne@riotousliving.com>
Signed-off-by: Wayne Witzel III <wayne@riotousliving.com>
Copy link
Contributor

@mklanjsek mklanjsek left a comment

Choose a reason for hiding this comment

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

Tested on my machine and it works well (note: I was also not able to repro the issue on my machine before the fix).

Notice that when I remove current-context field from bubeconfig file, Octant fails to start with this:

unable to start runner: failed to start service api: failed to init cluster client: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable

Since that used to make Octant show the Add a new kubeconfig popup, I thing this is much better than before (and as Wayne just pointed out to me, kubectl fails in that case too).

@wwitzel3
Copy link
Contributor Author

Tested on my machine and it works well (note: I was also not able to repro the issue on my machine before the fix).

Notice that when I remove current-context field from bubeconfig file, Octant fails to start with this:

unable to start runner: failed to start service api: failed to init cluster client: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable

Since that used to make Octant show the Add a new kubeconfig popup, I thing this is much better than before (and as Wayne just pointed out to me, kubectl fails in that case too).

I extended our error message to hint at checking the current-context

@GuessWhoSamFoo
Copy link
Contributor

Testing various ways to provide a kubeconfig (command line flag, environment variable, manual input through UI) will be need be expanded upon from the e2e proposal in #810

@GuessWhoSamFoo GuessWhoSamFoo merged commit 07e7f69 into vmware-archive:master Jul 20, 2020
@wwitzel3 wwitzel3 deleted the issue-1129 branch March 13, 2021 15:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

prompted to enter kubeconfig even though I provided one kubeconfig flag not working in 0.14
3 participants