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 columns with paths #755

Open
nadenf opened this issue Jun 5, 2020 · 22 comments
Open

Custom columns with paths #755

nadenf opened this issue Jun 5, 2020 · 22 comments
Labels
enhancement New feature or request

Comments

@nadenf
Copy link

nadenf commented Jun 5, 2020

Problem
I would like to have a new column in the Pods view to show a particular node selector label:
.spec.nodeSelector.type

Solution
Allow for an optional path field to be provided by the user for each column:

k9s:
  views:
    v1/pods:
      columns:
        - name: NAME
        - name: AGE
        - name: TYPE
          path: .spec.nodeSelector.type
        - name: APP
          path: nodeLabels.app

It would actually mimic the behaviour of kubectl:

kubectl get pod -o=custom-columns=TYPE:.spec.nodeSelector.type

And would solve #605 as well.

@nadenf nadenf changed the title Custom columns with selectors Custom columns with paths Jun 5, 2020
@derailed derailed added the enhancement New feature or request label Jun 13, 2020
@justinaslelys
Copy link

First of all I would like to say that k9s is the most useful tool in whole k8s ecosystem for me. Thank you @derailed for making it available.

It's very good suggestion by @nadenf
Personally I was searching how could I add additional custom column to my nodes view, for example availability zone which comes from .metadata.labels.topology.kubernetes.io/zone=eu-west-1a in my case.

@cotej
Copy link

cotej commented Jul 28, 2020

Found this while also looking for a way that I could conveniently display the zone for my nodes view... Sounds like this would be a great way to accomplish that and more!

@Xyaren
Copy link

Xyaren commented Oct 1, 2020

This is an absolute killer feature !

@sgandon
Copy link
Contributor

sgandon commented Dec 21, 2020

This would be a great feature !
I am looking for a way to add a custom column to display a CRD specific field.
In fact we are leveraging flux and the helm operator for deployment and we are deploying a lot of HelmRelease CRDs.
In order to view that a HelmRealse has been updated I would like to display the .spec.chart.version as a column.

@fragolinux
Copy link
Contributor

inspired by this, i created a k9s plugin to do reconcile and resume/suspend on helmreleases, kustomizations and git sources

@fragolinux
Copy link
Contributor

i added a plugin to allow showing of suspended resources, till custom columns based on spec will be available: #1584

@natdm
Copy link

natdm commented Jun 29, 2022

A little over two years old, this would be a great feature. Lens looks fine, but I'd prefer to stick to k9s.

@danielrubin1989
Copy link

@derailed sounds like must have feature. so much use cases in my head for custom columns. please think about that.
On next v0.26.6 :)?

@danielloader
Copy link

Absolutely useful for PVs so I can see which AZ/region they're in. Same for nodes.

@Taiquan-Liu
Copy link

It would be super useful for our Custom Resources which have a lot of annotations and labels that we would like to be able to filter easily.

Of course I can use e.g. -o 'custom-columns=NAME:.metadata.name, DESCRIPTION:.metadata.annotations.description' in kubectl get but I love k9s so much that I really hope it can have this feature ❤️

@hotzen
Copy link

hotzen commented Aug 24, 2023

found this because I want to display the csi.volume.kubernetes.io/nodeid annotation and the topology.kubernetes.io/zone label

thanks so much for k9s ❤️

@fred161
Copy link

fred161 commented Sep 14, 2023

I'm a big fan of k9s! Just came accross the views.yml and it would be so cool to have it to work with paths!

@loquilloll
Copy link

+1

@smangels
Copy link

I vote for it as well!

  • 1

@matiaszilli
Copy link

+1 for this

@saedx1
Copy link

saedx1 commented Nov 14, 2023

+1

1 similar comment
@diegodiaz1256
Copy link

+1

@qlimenoque
Copy link

+

It would be great to see custom FluxCD Kustomization .spec.suspend column in a single Kustomization view.

@nirajvora1
Copy link

Hey checking in here, is this available in the latest k9s release? would love to see a column in my pods view showing availability zone

@foglienimatteo
Copy link

+1

@GlacierWalrus
Copy link

In a world where code is king, and GitHub's the court, Where programmers commune to build and support. There's a tiny transgression, a seemingly slight act, That, repeated again and again, becomes a tract.

On threads of code, a vast digital sea, A chorus emerges, "I agree!", "Count me!", But alas, what's this, not words, but ardor plain, The "+1" comment audaciously staking its claim.

It's tiny, it's quick, it seems so neat, But does it help? Or simply repeat? "On GitHub, our realm," developers lament, "These '+1s' clutter up our environment."

A scroll, a scroll, so many to review, Beneath each proposal, "+1", "Me too!" While the thoughtful, insightful, lose their hue, In a surging sea of '+1', they're lost to view.

Votes of support, they seem at a glance, But in the clutter, do our codes advance? We squint our eyes, we sift, we squander, In this "+1" storm, too much to ponder.

So here's a plea, a method less mundane, A way to cast your vote without pain. Use the "+1" reaction, let your conservatism recede, In a cleaner thread, we all can proceed.

Hover your pointer, the emoji's right there, A tidy '+1', floating in air. Just a click, and voila, your vote is cast, No lengthy scroll, the clutter reduced, at last!

"Ah," you sigh, "Our threads are so clear!" "+1" in comments? No, not here. Reduced to meaning, stripped of the frivolous, Each issue, crisp; each comment, meticulous.

So next time on GitHub, when the pull requests dance, Choose the "+1" emoji, give clarity a chance. Let not our efforts be merely symbolic, In this realm of code, let's be methodically stoic.

-- GPT-4
Prompt: can you write me a poem about "why people commenting +1 on github is really irritating and how they should use the +1 reaction instead"?

@ashtongraves
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.