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

add --sort? #177

Open
ahmetb opened this issue Apr 22, 2022 · 4 comments
Open

add --sort? #177

ahmetb opened this issue Apr 22, 2022 · 4 comments

Comments

@ahmetb
Copy link

ahmetb commented Apr 22, 2022

This plugin is great! I use it daily, but sometimes I find myself doing kubectl view-allocations -g namespace -r cpu to see which namespaces have the most allocations. But finding that right now is manual. I think it can be applied to other resources too.

(I actually tried to add this myself but sadly my Rust skills are non-existent.)

@davidB
Copy link
Owner

davidB commented Apr 24, 2022

Hi,
I'm glad to know that the plugin is useful.
Can you give more details about the feature ?
For example, do you expect that --sort "column" will sort in ,decreasing, on the column ("usage", "requested", "limit" in Qty (or in %)) and keep hierarchy, but sort between sibling only ?

@ahmetb
Copy link
Author

ahmetb commented May 1, 2022

Honestly not sure :) maybe --sort=-2 sorts the 2nd col descending, I don't know. Might complicate things quite a bit.

@ahmetb
Copy link
Author

ahmetb commented Oct 20, 2022

I came to open this issue again :D

I think I'm trying to figure out answers to something like: show me namespaces with most cpu allocations. e.g.

 kubectl view-allocations -g namespace -r cpu --sort=-cpu

even this would go a long way. I think also, while scrolling down the list and examining results by eye, human-readable ints like 1.5k aren't helping as they don't appear longer than 10.0 :)

@davidBernardWefox
Copy link

I guess you have a typo in your sample

kubectl view-allocations -g namespace -r cpu --sort=-allocation

I'll see how to provide a first cli for this, but may be more sql like

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

3 participants