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

When specifying the context command via the -c flag, selecting a cluster always returns to the context view #2085

Closed
tyzbit opened this issue May 10, 2023 · 1 comment · Fixed by #2096

Comments

@tyzbit
Copy link
Contributor

tyzbit commented May 10, 2023




Describe the bug
When specifying the context command via the -c flag, selecting a cluster always returns to the context view

To Reproduce
Steps to reproduce the behavior:

  1. Run k9s with the context command: k9s -c context
  2. Select any non-active cluster

Expected behavior
k9s should present the user with the previous view for that cluster, or if the previous view was context, it should switch to pods view.

Versions (please complete the following information):

  • OS: [e.g. OSX] Ventura 13.3.1
  • K9s: [e.g. 0.1.0] v0.27.4
  • K8s: [e.g. 1.11.0] 1.21.9

Additional context
First reported here #2045

@tyzbit
Copy link
Contributor Author

tyzbit commented May 10, 2023

I will work on this.

I suspect the root cause has to do with specifying the command as context on the command line and perhaps at some point in switching views, it chooses the manually specified context command again instead of the previous view or pods view. If that's the case, then I would work on a patch such that -c context starts with the context view but every command and view change after that will not take the -c context argument into consideration when determining the view.

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