From 8d2d4f1736b703ef78da0721134fb72957726c77 Mon Sep 17 00:00:00 2001 From: Vlad Vasilyeu Date: Thu, 13 Feb 2025 13:01:27 +0000 Subject: [PATCH] Register eviction for forcefully deleted pods --- cluster-autoscaler/core/scaledown/actuation/drain.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cluster-autoscaler/core/scaledown/actuation/drain.go b/cluster-autoscaler/core/scaledown/actuation/drain.go index 5914a52436c..ca836a88449 100644 --- a/cluster-autoscaler/core/scaledown/actuation/drain.go +++ b/cluster-autoscaler/core/scaledown/actuation/drain.go @@ -261,6 +261,9 @@ func (e Evictor) evictPod(ctx *acontext.AutoscalingContext, podToEvict *apiv1.Po if err := forceDeletePod(ctx, podToEvict); err != nil { return status.PodEvictionResult{Pod: podToEvict, TimedOut: false, Err: err} } + if e.evictionRegister != nil { + e.evictionRegister.RegisterEviction(podToEvict) + } return status.PodEvictionResult{Pod: podToEvict, TimedOut: false, Err: nil} } if fullEvictionPod {