mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Skip PreScore
when the TopologySpreadConstraints
is specified
`DefaultPodTopologySpread` need't score when the `TopologySpreadConstraints` is specified. `PreScore` needn't do this as well, this cut off the cost of `PreScore` if possible. Signed-off-by: Dave Chen <dave.chen@arm.com>
This commit is contained in:
parent
cf36d9b8e9
commit
068c69d743
@ -171,6 +171,9 @@ func (pl *DefaultPodTopologySpread) ScoreExtensions() framework.ScoreExtensions
|
||||
|
||||
// PreScore builds and writes cycle state used by Score and NormalizeScore.
|
||||
func (pl *DefaultPodTopologySpread) PreScore(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, nodes []*v1.Node) *framework.Status {
|
||||
if skipDefaultPodTopologySpread(pod) {
|
||||
return nil
|
||||
}
|
||||
var selector labels.Selector
|
||||
informerFactory := pl.handle.SharedInformerFactory()
|
||||
selector = helper.DefaultSelector(
|
||||
|
Loading…
Reference in New Issue
Block a user