Sched framework: expose NodeInfo in all functions of PluginsRunner interface
This commit is contained in:
@@ -428,7 +428,7 @@ func (*PreScorePlugin) Name() string {
|
||||
}
|
||||
|
||||
// PreScore is a test function.
|
||||
func (pfp *PreScorePlugin) PreScore(ctx context.Context, _ *framework.CycleState, pod *v1.Pod, _ []*v1.Node) *framework.Status {
|
||||
func (pfp *PreScorePlugin) PreScore(ctx context.Context, _ *framework.CycleState, pod *v1.Pod, _ []*framework.NodeInfo) *framework.Status {
|
||||
pfp.numPreScoreCalled++
|
||||
if pfp.failPreScore {
|
||||
return framework.NewStatus(framework.Error, fmt.Sprintf("injecting failure for pod %v", pod.Name))
|
||||
@@ -542,11 +542,7 @@ func (pp *PostFilterPlugin) PostFilter(ctx context.Context, state *framework.Cyc
|
||||
for _, nodeInfo := range nodeInfos {
|
||||
pp.fh.RunFilterPlugins(ctx, state, pod, nodeInfo)
|
||||
}
|
||||
var nodes []*v1.Node
|
||||
for _, nodeInfo := range nodeInfos {
|
||||
nodes = append(nodes, nodeInfo.Node())
|
||||
}
|
||||
pp.fh.RunScorePlugins(ctx, state, pod, nodes)
|
||||
pp.fh.RunScorePlugins(ctx, state, pod, nodeInfos)
|
||||
|
||||
if pp.failPostFilter {
|
||||
return nil, framework.NewStatus(framework.Error, fmt.Sprintf("injecting failure for pod %v", pod.Name))
|
||||
|
Reference in New Issue
Block a user