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

feat: add InitialView configuration option to k9s #2857

Closed
wants to merge 0 commits into from

Conversation

uozalp
Copy link
Contributor

@uozalp uozalp commented Aug 29, 2024

This pull request introduces a new configuration setting called initialView that allows users to specify the initial view in the application. The changes span across multiple files to integrate this new setting into the application logic, configuration, and documentation.

Configuration and Documentation Updates:

Application Logic Updates:

  • cmd/root.go: Modified the run function to set the active view based on the initialView configuration if it is specified.
  • internal/config/k9s.go:
    • Added InitialView as a new field in the K9s struct.
    • Updated the Merge method to include merging the InitialView field.

@wjiec
Copy link
Contributor

wjiec commented Aug 30, 2024

It seems that there is already a similar feature that enables modifying the default view at start time, e.g. k9s -c 'cm kube-system'

@uozalp
Copy link
Contributor Author

uozalp commented Aug 30, 2024

It's correct that you can use the -c flag to start k9s in another view, but it does require extra steps each time, which might be easy to forget. While creating an alias is an option, it's still a workaround. Given that we manage multiple clusters, having a built-in feature to always start in the context view would be much simpler and more convenient.

@uozalp
Copy link
Contributor Author

uozalp commented Aug 31, 2024

@derailed what do you say?

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.

2 participants