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

DRAFT: Allow (Pod) label values as table columns #3076

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

Conversation

KevinGimbel
Copy link

Doesn't work yet.

I'm unsure if the direction is correct.

The idea from #3050 is to allow custom pod labels to be used as column values in the pod view.

For example:

  • given a pod with a Label severity=high
  • the following views.yaml config
# views.yaml
views:
  v1/pods:
    columns:
      - name: NAME
      - name: LABEL
        key: severity

would result in the following k9s view table being rendered

NAME    severity   STATUS   READY
my-pod  hight      Running  1/1

Potentially, this could be used for all resources but I don't know where to best place the code.

@KevinGimbel KevinGimbel marked this pull request as draft January 23, 2025 09:42
@KevinGimbel KevinGimbel mentioned this pull request Jan 23, 2025
@KevinGimbel
Copy link
Author

Another idea from #3011

views:
   v1/nodes:
      columns:
          - Capacity-Type: .metadata.labels.eks\.amazonaws\.com/capacityType
          - Instance-Type: .metadata.labels.eks\.amazonaws\.com/instance-type
          - AZ: .metadata.labels.topology\.kubernetes\.io/zone

This would add a key-value mapping where the key is the column name, and the value is the (label) source.

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.

1 participant