diff --git a/cluster-autoscaler/simulator/cluster.go b/cluster-autoscaler/simulator/cluster.go index 690e1982801563ed2d0c490ef64a340a002a6acd..17eae04c803a3de49d0cc5b55cd10604f26189f0 100644 --- a/cluster-autoscaler/simulator/cluster.go +++ b/cluster-autoscaler/simulator/cluster.go @@ -226,6 +226,7 @@ func (r *RemovalSimulator) findPlaceFor(removedNode string, pods []*apiv1.Pod, n klog.Errorf("Simulating removal of %s/%s return error; %v", pod.Namespace, pod.Name, err) } } + // Remove the node from the snapshot, so that it doesn't interfere with topology spread constraint scheduling. r.clusterSnapshot.RemoveNodeInfo(removedNode) newpods := make([]*apiv1.Pod, 0, len(pods))