Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Incorrect pod containers displayed when using custom resource columns #2734

@aiai-guenz

Description

@aiai-guenz




Describe the bug
Pressing the Enter key to go into a pod displays the containers of a different pod, not the expected one. This issue occurs only with custom resource column definitions.

To Reproduce
Steps to reproduce the behavior:

  1. Create custom resource columns as shown in the example here: https://k9scli.io/topics/columns/
  2. Open K9s.
  3. Enter the pods view by typing :pods. There should be multiple pods listed, not just one.
  4. The pods are initially sorted by age according to the column definitions. Press Shift-N to sort them by name. The resulting order should differ from the age-based sorting.
  5. Navigate to one of the pods and press the Enter key. Instead of entering the selected pod, you enter the pod from the original age-based sorting.
  6. Press the Esc key to leave the container view, which returns you to the pods view, but the sorting by name is lost.

Expected behavior
I expect to see the containers of the pod that I select and press the Enter key for.

Versions (please complete the following information):

  • OS: OSX
  • K9s: v0.32.4
  • K8s: v1.27.13

Additional context
This issue occurs only with custom resource column definitions. Without custom columns, sorting and accessing pods function as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions