mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-01 10:48:15 +00:00
Expose NodeInfo to Score plugins
Co-authored-by: shenxin <rougang.hrg@alibaba-inc.com> Signed-off-by: saintube <saintube@foxmail.com>
This commit is contained in:
@@ -132,7 +132,7 @@ func (pl *TestScoreWithNormalizePlugin) NormalizeScore(ctx context.Context, stat
|
||||
return injectNormalizeRes(pl.inj, scores)
|
||||
}
|
||||
|
||||
func (pl *TestScoreWithNormalizePlugin) Score(ctx context.Context, state *framework.CycleState, p *v1.Pod, nodeName string) (int64, *framework.Status) {
|
||||
func (pl *TestScoreWithNormalizePlugin) Score(ctx context.Context, state *framework.CycleState, p *v1.Pod, nodeInfo *framework.NodeInfo) (int64, *framework.Status) {
|
||||
return setScoreRes(pl.inj)
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ func (pl *TestScorePlugin) PreScore(ctx context.Context, state *framework.CycleS
|
||||
return framework.NewStatus(framework.Code(pl.inj.PreScoreStatus), injectReason)
|
||||
}
|
||||
|
||||
func (pl *TestScorePlugin) Score(ctx context.Context, state *framework.CycleState, p *v1.Pod, nodeName string) (int64, *framework.Status) {
|
||||
func (pl *TestScorePlugin) Score(ctx context.Context, state *framework.CycleState, p *v1.Pod, nodeInfo *framework.NodeInfo) (int64, *framework.Status) {
|
||||
return setScoreRes(pl.inj)
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ func (pl *TestPlugin) Less(*framework.QueuedPodInfo, *framework.QueuedPodInfo) b
|
||||
return false
|
||||
}
|
||||
|
||||
func (pl *TestPlugin) Score(ctx context.Context, state *framework.CycleState, p *v1.Pod, nodeName string) (int64, *framework.Status) {
|
||||
func (pl *TestPlugin) Score(ctx context.Context, state *framework.CycleState, p *v1.Pod, nodeInfo *framework.NodeInfo) (int64, *framework.Status) {
|
||||
return 0, framework.NewStatus(framework.Code(pl.inj.ScoreStatus), injectReason)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user