fix(quotas): use allocated recording rules to exclude terminated pods

Signed-off-by: Arsolitt <arsolitt@gmail.com>
This commit is contained in:
Arsolitt 2026-04-19 11:08:25 +03:00
parent 43fe172d2f
commit f8b9900873
No known key found for this signature in database
GPG key ID: 4D8302CE6A9247C4

View file

@ -278,7 +278,7 @@
"id": 11,
"targets": [
{
"expr": "sum by (namespace) (kube_pod_container_resource_requests{resource=\"nvidia_com_gpu\", namespace=~\"$namespace\"})",
"expr": "sum by (namespace) (namespace:gpu_count:allocated{namespace=~\"$namespace\"})",
"legendFormat": "{{namespace}}",
"refId": "A"
}
@ -346,7 +346,7 @@
"refId": "A"
},
{
"expr": "sum(kube_pod_container_resource_requests{resource=\"nvidia_com_gpu\", namespace=~\"$namespace\"})",
"expr": "sum(namespace:gpu_count:allocated{namespace=~\"$namespace\"})",
"legendFormat": "Requested",
"refId": "B"
}