diff --git a/pkg/scheduler/framework/plugins/defaultpreemption/default_preemption.go b/pkg/scheduler/framework/plugins/defaultpreemption/default_preemption.go index 711b54bf37d..b096f93ed14 100644 --- a/pkg/scheduler/framework/plugins/defaultpreemption/default_preemption.go +++ b/pkg/scheduler/framework/plugins/defaultpreemption/default_preemption.go @@ -127,7 +127,7 @@ func (pl *DefaultPreemption) GetOffsetAndNumCandidates(numNodes int32) (int32, i // This function is not applicable for out-of-tree preemption plugins that exercise // different preemption candidates on the same nominated node. func (pl *DefaultPreemption) CandidatesToVictimsMap(candidates []preemption.Candidate) map[string]*extenderv1.Victims { - m := make(map[string]*extenderv1.Victims) + m := make(map[string]*extenderv1.Victims, len(candidates)) for _, c := range candidates { m[c.Name()] = c.Victims() }