Closed piotrminkina closed 2 weeks ago
This issue has not had any activity in the past 30 days, so the
stale
label has been added to it.
stale
label will be removed if there is new activitykeepalive
label to exempt this issue from the stale check actionThank you for your contributions!
Fixed by #962
Hello
I'm using
release-0.8
of kubernetes-mixin, kube-state-metrics v2.1.1 and kubernetes v1.20.8. I think usage of metrickube_resourcequota
is incomplete in the following part of code:https://github.com/kubernetes-monitoring/kubernetes-mixin/blob/7120319a5b5c45e8dd2e79f0ad60e2284c6d6f1b/dashboards/resources/namespace.libsonnet#L83-L86
I think it should be something like this:
As described in https://kubernetes.io/docs/concepts/policy/resource-quotas/#compute-resource-quota, we may use "cpu" or "requests.cpu" and "memory" or "requests.memory", but queries from kubernetes-mixins omits "cpu" and "memory".
For tests I applied the following resource:
Next I got status of this resource:
As you can see, used cpu and requests.cpu are the same, similar to used memory and requests.memory. Strange situation is with hard cpu and requests.cpu — in this case I don't see what value is priority for k8s. Same situation is with hard memory and requests.memory.
I reported this problem because in my organisation we are using hard cpu and memory. Without proposed changes we can't see requests quotas on Grafana Dashboards.
Regards Piotr Minkina