-
Notifications
You must be signed in to change notification settings - Fork 693
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
Respect the $KUBECONFIG
env as top precedence
#331
Comments
patrickpichler
pushed a commit
to patrickpichler/k8sgpt
that referenced
this issue
Apr 25, 2023
Before, the default value set for the `--kubeconfig` flag prevented the `KUBECONFIG` env variable to be ever taken into consideration. This behavior has now been fixed. If `--kubeconfig` flag is set, it takes precedence over the `KUBECONFIG` env variable. fixes k8sgpt-ai#331 Signed-off-by: Patrick Pichler <git@patrickpichler.dev>
4 tasks
patrickpichler
pushed a commit
to patrickpichler/k8sgpt
that referenced
this issue
Apr 26, 2023
Before, the default value set for the `--kubeconfig` flag prevented the `KUBECONFIG` env variable to be ever taken into consideration. This behavior has now been fixed. If `--kubeconfig` flag is set, it takes precedence over the `KUBECONFIG` env variable. fixes k8sgpt-ai#331 Signed-off-by: Patrick Pichler <git@patrickpichler.dev>
AlexsJones
pushed a commit
that referenced
this issue
Apr 26, 2023
Before, the default value set for the `--kubeconfig` flag prevented the `KUBECONFIG` env variable to be ever taken into consideration. This behavior has now been fixed. If `--kubeconfig` flag is set, it takes precedence over the `KUBECONFIG` env variable. fixes #331 Signed-off-by: Patrick Pichler <git@patrickpichler.dev> Co-authored-by: Patrick Pichler <git@patrickpichler.dev>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Checklist:
Is this feature request related to a problem?
On first try, I couldn't able to run k8sgpt:
Even
$KUBECONFIG
is set and context is correct:This means that k8sgpt is inconsistent with how kubectl handle this.
Current behavior is k8sgpt does not respect
$KUBECONFIG
env. You should manually copy the path of kubeconfig and pass--kubeconfig
flag every time when you switch the context, which significantly decrease overall UX.Expected behavior:
Describe the solution you'd like
Respect
$KUBECONFIG
env (if set) and it should be first precedence. (like how kubectl did)Benefits for the project and its users
Consistency and better UX.
Potential drawbacks
It would be a backward-incompatible behavior.
Additional context
-
The text was updated successfully, but these errors were encountered: