Add percent used
yashbhutwala opened this issue · comments
I like percent requests of the allocatable and percent limits of the allocatable, is it possible to add percent used of the allocatable?
Can you provide a sample of what you would like ?
Sorry, I miss the notification for this request
I was hoping to use your tool to also get information similar to the utilization aspect of the resource-capacity plugin and/or kubectl top
> kubectl resource-capacity -p -u -n gitlab-managed-apps
NODE NAMESPACE POD CPU REQUESTS CPU LIMITS CPU UTIL MEMORY REQUESTS MEMORY LIMITS MEMORY UTIL
* * * 0m (0%) 0m (0%) 2313m (8%) 0Mi (0%) 0Mi (0%) 14765Mi (15%)
gke-sig-gitlab-builds-master-pool-31a7880b-hnr5 * * 0m (0%) 0m (0%) 792m (84%) 0Mi (0%) 0Mi (0%) 879Mi (33%)
gke-sig-gitlab-builds-master-pool-3505478d-t038 * * 0m (0%) 0m (0%) 65m (6%) 0Mi (0%) 0Mi (0%) 835Mi (31%)
gke-sig-gitlab-builds-master-pool-89b804d3-w42c * * 0m (0%) 0m (0%) 145m (15%) 0Mi (0%) 0Mi (0%) 924Mi (35%)
gke-sig-gitlab-builds-static-pool-589eda96-1l3j * * 0m (0%) 0m (0%) 156m (1%) 0Mi (0%) 0Mi (0%) 6147Mi (21%)
gke-sig-gitlab-builds-static-pool-9e93d183-w9lc * * 0m (0%) 0m (0%) 86m (1%) 0Mi (0%) 0Mi (0%) 2873Mi (10%)
gke-sig-gitlab-builds-static-pool-a9de0921-44fq * * 0m (0%) 0m (0%) 1072m (13%) 0Mi (0%) 0Mi (0%) 3105Mi (10%)
Hi @davidB, I second @yashbhutwala's request. In the hopes of offering some more clarity, when I first found this plugin I thought the "allocations" it was showing were the resources currently used in the cluster. Now I understand that it's actually showing requests and limits defined in cluster objects, but not actually retrieving utilization metrics in the way kubectl top nodes
might do.
The kube-capacity
tool has the --util
(or -u
) option to switch its display from "allocations" to "current utilizations," which is really useful during troubleshooting. It would be great if view-allocations
could add a similar flag.
It's something that I planned, but never found the time to setup a cluster with metrics-server and to look at its api. I'll try to work on it in the coming days.
I released version 0.13. It includes --utilization/-u
to display utilization (cpu & memory only) if you have metrics-server setup on the cluster.
Feedback are welcomes, reopen the tickets if needed.