Update priorities to use SharedLister instead of using the snapshot directly

This commit is contained in:
Abdullah Gharaibeh
2019-10-29 16:22:00 -04:00
parent 5f900f6332
commit c6baa263a3
39 changed files with 169 additions and 155 deletions

View File

@@ -66,7 +66,7 @@ func (pl *NodeAffinity) Score(ctx context.Context, state *framework.CycleState,
// NormalizeScore invoked after scoring all nodes.
func (pl *NodeAffinity) NormalizeScore(ctx context.Context, state *framework.CycleState, pod *v1.Pod, scores framework.NodeScoreList) *framework.Status {
// Note that CalculateNodeAffinityPriorityReduce doesn't use priority metadata, hence passing nil here.
err := priorities.CalculateNodeAffinityPriorityReduce(pod, nil, pl.handle.NodeInfoSnapshot().NodeInfoMap, scores)
err := priorities.CalculateNodeAffinityPriorityReduce(pod, nil, pl.handle.SnapshotSharedLister(), scores)
return migration.ErrorToFrameworkStatus(err)
}