Skip to content

Commit

Permalink
Remove the check for dryRun in simulateSchedulingInDryRun.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhifei92 committed Dec 30, 2024
1 parent 1d63122 commit aa3aabf
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/descheduler/evictions/evictions.go
Original file line number Diff line number Diff line change
Expand Up @@ -563,11 +563,9 @@ func (pe *PodEvictor) EvictPod(ctx context.Context, pod *v1.Pod, opts EvictOptio
return nil
}

// simulateSchedulingInDryRun is used to reserve the resources of the selected fit node for pods that will be evicted.
// Only be used in dry-run mode.
func (pe *PodEvictor) simulateSchedulingInDryRun(pod *v1.Pod) {
if !pe.dryRun {
return
}

simlatePod := pod.DeepCopy()
if nodeName, ok := simlatePod.Annotations[node.FitNodeToPodAnnotationKey]; ok {
simlatePod.Spec.NodeName = nodeName
Expand Down

0 comments on commit aa3aabf

Please sign in to comment.