mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-08-19 04:26:25 +00:00
Pods evicted in background may stay in Succeeded/Failed phase forever without being garbage-collected, so the metric was silently dropped. Similarly, entries whose background eviction timed out in cleanCache were expired without recording an outcome. - UpdateFunc: emit "success"/"error" metric when a pod transitions to PodSucceeded/PodFailed respectively, matching the label convention used elsewhere in the file - cleanCache: add onAssumedTimeout callback on evictionRequestsCache, wired in NewPodEvictor to emit "error" for entries that exceed the assumed-eviction timeout - Add TestEvictionInBackgroundMetrics_PodCompleted and TestEvictionInBackgroundMetrics_AssumedTimeout to cover both paths Signed-off-by: Simone Tiraboschi <stirabos@redhat.com>