-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Description
Which component are you using?:
/area vertical-pod-autoscaler
What version of the component are you using?:
Component version: v1.5.0
What k8s version are you using (kubectl version)?:
kubectl version Output
$ kubectl version
What environment is this in?:
Local setup
What did you expect to happen?:
vpa-updater emits per-VPA metrics such as vpa_updater_in_place_updated_pods_total. In particular, vpa_updater_in_place_updated_pods_total is counter.
ChatGPT when asked whether components should always report counts from start, even if 0:
TL;DR Best Practice
✅ Components should always expose counters from start, even if 0.
✅ This ensures dashboards, alerts, and increase()/rate() behave correctly.
❌ Avoid only reporting when the counter increments.
What happened instead?:
vpa-updater does not expose vpa_updater_in_place_updated_pods_total from start with value 0 for VPAs.
This breaks increase()/rate() usages on this counter.
How to reproduce it (as minimally and precisely as possible):
-
Create a new VPA.
-
Ensure that vpa-updater does not emit metrics for
vpa_updater_in_place_updated_pods_totalfor the new VPA until there is an in-place eviction for that VPA:% curl http://localhost:8943/metrics | grep resource-consumer (no output) -
Adapt the VPA so that it performs an in-place update (for example increase the minAllowed values)
-
Ensure that vpa-updater starts emitting
vpa_updater_in_place_updated_pods_totalfor that VPA only when there is an in-place eviction about it.% curl http://localhost:8943/metrics | grep resource-consumer vpa_updater_in_place_updated_pods_total{vpa_name="resource-consumer",vpa_namespace="default",vpa_size_log2="0"} 1
Anything else we need to know?:
N/A