-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
Which component are you using?:
vertical-pod-autoscaler
What version of the component are you using?:
Component version: 1.5.1
What k8s version are you using (kubectl version)?:
kubectl version Output
$ kubectl version Client Version: v1.32.7 Kustomize Version: v5.5.0 Server Version: v1.29.3
What environment is this in?: local dev with kind and cloud
What did you expect to happen?:
The vpa_recommender_vpa_objects_count metric does not properly initialize the InPlaceOrRecreate update mode. The metric correctly incremented when VPAs of this type were added. When they were removed, however, the metric did not decrement.
What happened instead?: Counter did not reflect the removal of the VPA resources.
How to reproduce it (as minimally and precisely as possible):
- Add VPAs with update mode of InPlaceOrRecreate
- Observe metric
vpa_recommender_vpa_objects_count{update_mode="InPlaceOrRecreate"} - Remove VPAs with update mode of InPlaceOrRecreate
- Observe the metric did not reflect removal of VPA resources
Anything else we need to know?:
Simple oversight in the code that was due to the InPlaceOrRecreate update mode being added after the other update modes.