If a container doesn't have cpu limits, kube_pod_resource_limit reports the init-container limit #2295
Labels
kind/bug
Categorizes issue or PR as related to a bug.
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
What happened: Given the following pod:
kube_pod_resource_limit
reports 500m as the pod limit.What you expected to happen: As per Init Containers documentation:
Since the app container doesn't have cpu limits, which means "no limit", I would have expected that
kube_pod_resource_limit
reportsnone
.How to reproduce it (as minimally and precisely as possible):
sum(kube_pod_resource_limit{resource='cpu',pod='example',namespace='test'})
Anything else we need to know?:
Environment: Openshift 4.12.
kubectl version
):I0102 12:41:29.597851 1 server.go:254] "Run with Kubernetes cluster version" major="1" minor="25"
The text was updated successfully, but these errors were encountered: