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

fix: Ignore loading context plugins with empty context (derailed/k9s#2651) #2714

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tws-rdelatorre
Copy link

@tws-rdelatorre tws-rdelatorre commented May 22, 2024

Fixes #2651

I decided to give it a shot at fixing the error message that appears when running k9s without a context.

This PR skips loading context-aware configurations when loading plugins if there is no current context (i.e. when current-context in the kubeconfig is empty). Note that, if there is no current context, k9s will still try to connect to the default k8s server address, which is http://localhost:8080, and will end with a connection error anyway if there isn't any kube-apiserver listening locally at that port.

When loading plugins, skip loading context-aware configurations if there
is no current context (i.e. when `current-context` in the kubeconfig is
empty).
@tws-rdelatorre tws-rdelatorre changed the title Ignore loading context plugins with empty context (derailed/k9s#2651) fix: Ignore loading context plugins with empty context (derailed/k9s#2651) Jul 1, 2024
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.

"Plugins load failed!" when no current context
1 participant