Merge pull request #92247 from chendave/skiptopology

Skip `PreScore` when the `TopologySpreadConstraints` is specified
This commit is contained in:
Kubernetes Prow Robot 2020-06-19 11:37:44 -07:00 committed by GitHub
commit 5968bc4653
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -172,6 +172,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(