robscott / kube-capacity

A simple CLI that provides an overview of the resource requests, limits, and utilization in a Kubernetes cluster
Apache License 2.0
2.09k stars 114 forks source link

Cpu request limit is wrong #74

Open peterlai-roboops opened 1 year ago

peterlai-roboops commented 1 year ago

kube-capacity -n ocsl-dev -p

configuration-server-92-42zwb 250m (1%) 1000m (6%) 750Mi (0%) 1024Mi (0%)

But the actual request in 200m. There are init containers, but none of them are 50m, so i don't understand where its getting the 250m from.

resources: limits: cpu: "1" memory: 1Gi requests: cpu: 200m memory: 750Mi

peterlai-roboops commented 1 year ago

image So not an issue with the api/v1/pods , that is returning the correct cpu request.

robscott commented 1 year ago

Thanks for reporting this! I've been pretty underwater recently but if anyone has time to fix this I'll try to review a PR ASAP.

cloud-66 commented 1 year ago

Can you show deployment manifest ? i have initcontainers but this issue is not reproducing.