diff --git a/cluster-autoscaler/core/scaledown/deletiontracker/nodedeletiontracker.go b/cluster-autoscaler/core/scaledown/deletiontracker/nodedeletiontracker.go index d3d5a53b440b..5a9001629fe6 100644 --- a/cluster-autoscaler/core/scaledown/deletiontracker/nodedeletiontracker.go +++ b/cluster-autoscaler/core/scaledown/deletiontracker/nodedeletiontracker.go @@ -173,6 +173,9 @@ func (n *NodeDeletionTracker) ClearResultsNotNewerThan(t time.Time) { func (n *NodeDeletionTracker) Snapshot() *NodeDeletionTracker { n.Lock() defer n.Unlock() + + n.evictions.DropNotNewerThan(n.clock.Now().Add(-n.evictionsTTL)) + snapshot := NewNodeDeletionTracker(n.evictionsTTL) for k, val := range n.emptyNodeDeletions { snapshot.emptyNodeDeletions[k] = val