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

Custom pods view is not applying until context will be switched #3002

Open
Crandel opened this issue Dec 2, 2024 · 1 comment
Open

Custom pods view is not applying until context will be switched #3002

Crandel opened this issue Dec 2, 2024 · 1 comment

Comments

@Crandel
Copy link

Crandel commented Dec 2, 2024




Describe the bug
I've created custom pods view at the path ~/.config/k9s/views.yaml in order to have the most important information at the beginning (AGE, NAME and STATUS). But when I start k9s I still get default view with AGE at the last place. k9s will switch to my custom view only if I change the cluster with ctx command, even if I change to the same cluster.

views:
  # Alters the pod view column layout. Uses GVR as key
  v1/pods:
    # Overrides default sort column
    sortColumn: AGE:asc
    columns:
      - AGE
      - NAME
      - STATUS
      - READY
      - RESTARTS
      - NAMESPACE
      - NODE
      - IP

  # Alters the service view column layout
  v1/services:
    columns:
      - AGE
      - NAMESPACE
      - NAME
      - TYPE
      - CLUSTER-IP

To Reproduce
Steps to reproduce the behavior:

  1. Create custom view for v1/pods
  2. Open k9s pods view
  3. Still default pod view on the screen

Historical Documents
k9s -l debug

🐶 K9s starting up...
DBG Context config not found! Generating... "/home/user/.local/share/k9s/clusters/test_cluster/farm/config.yaml"
DBG Active Context "farm"
✅ Kubernetes connectivity
DBG [Skin] Loading global skin ("gruvbox-dark")
DBG Loading skin file: "/home/user.config/k9s/skins/gruvbox-dark.yaml"
DBG Factory START with ns `"test-namespace"
DBG Fetching latest k9s rev...
DBG K9s latest rev: "v0.32.7"
DBG [Skin] Loading global skin ("gruvbox-dark")
DBG Loading skin file: "/home/user.config/k9s/skins/gruvbox-dark.yaml"
DBG ConfigWatcher watching: "/home/user.config/k9s/config.yaml"
DBG ConfigWatcher watching: "/home/user/.local/share/k9s/clusters/test_cluster/farm/config.yaml"
DBG SkinWatcher watching "/home/user.config/k9s/skins"
DBG Switching context "farm"
DBG ClusterInfo updater canceled!
DBG CustomViewWatcher CANCELED `/home/user.config/k9s/views.yaml!!
DBG SkinWatcher CANCELED `/home/user.config/k9s/skins/gruvbox-dark.yaml!!
DBG ConfigWatcher CANCELED
DBG Saved context config for: "farm"
DBG Factory START with ns `"test-namespace"
DBG --> Switching Context "farm" -- "test-namespace" -- "po"
DBG [Skin] Loading global skin ("gruvbox-dark")
DBG Loading skin file: "/home/user.config/k9s/skins/gruvbox-dark.yaml"
DBG ConfigWatcher watching: "/home/user.config/k9s/config.yaml"
DBG ConfigWatcher watching: "/home/user/.local/share/k9s/clusters/test_cluster/farm/config.yaml"
DBG SkinWatcher watching "/home/user.config/k9s/skins"
DBG ConfigWatcher file changed: /home/user/.local/share/k9s/clusters/test_cluster/farm/config.yaml

Expected behavior
Custom view should be opened since the start.

Versions (please complete the following information):

  • OS: Arch
  • K9s: v0.32.7
  • K8s: v1.29.9
k9s info
 ____  __.________
|    |/ _/   __   \______
|      < \____    /  ___/
|    |  \   /    /\___ \
|____|__ \ /____//____  >
        \/            \/

Version:           0.32.7
Config:            /home/user/.config/k9s/config.yaml
Custom Views:      /home/user/.config/k9s/views.yaml
Plugins:           /home/user/.config/k9s/plugins.yaml
Hotkeys:           /home/user/.config/k9s/hotkeys.yaml
Aliases:           /home/user/.config/k9s/aliases.yaml
Skins:             /home/user/.config/k9s/skins
Context Configs:   /home/user/.local/share/k9s/clusters
Logs:              /home/user/.local/state/k9s/k9s.log
Benchmarks:        /home/user/.local/state/k9s/benchmarks
ScreenDumps:       /tmp/k9s/screen-dumps

Additional context
I've cleaned cluster configs on ~/.local/share/k9s/clusters path, still the same error.

@yurii-kryvosheia
Copy link

Broken in 0.32.7
Changes are applied only after you make changes to views.yaml file.

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

No branches or pull requests

2 participants