mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 11:18:16 +00:00
feature(NodeAffinity): return Skip in PreScore when nothing to do in Score
This commit is contained in:
@@ -222,6 +222,10 @@ func (pl *NodeAffinity) PreScore(ctx context.Context, cycleState *framework.Cycl
|
||||
if err != nil {
|
||||
return framework.AsStatus(err)
|
||||
}
|
||||
if preferredNodeAffinity == nil && pl.addedPrefSchedTerms == nil {
|
||||
// NodeAffinity Score has nothing to do with the Pod.
|
||||
return framework.NewStatus(framework.Skip)
|
||||
}
|
||||
state := &preScoreState{
|
||||
preferredNodeAffinity: preferredNodeAffinity,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user