Skip to content

Commit cc7a83c

Browse files
committed
feat(logic/updater): Increase failed Pods eviction counter metric when an error occurs
This commit uses the new metric utility to increase the total number of failed Pod evictions attempts.
1 parent 1ff4b7c commit cc7a83c

File tree

1 file changed

+1
-0
lines changed
  • vertical-pod-autoscaler/pkg/updater/logic

1 file changed

+1
-0
lines changed

vertical-pod-autoscaler/pkg/updater/logic/updater.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ func (u *updater) RunOnce(ctx context.Context) {
302302
evictErr := evictionLimiter.Evict(pod, vpa, u.eventRecorder)
303303
if evictErr != nil {
304304
klog.V(0).InfoS("Eviction failed", "error", evictErr, "pod", klog.KObj(pod))
305+
metrics_updater.RecordFailedEviction(vpaSize, updateMode, "EvictionError")
305306
} else {
306307
withEvicted = true
307308
metrics_updater.AddEvictedPod(vpaSize, updateMode)

0 commit comments

Comments
 (0)