EvenPodsSpread: weigh constraints individually

- update logic to weigh each constraint individually
- address comments and misc fixes
This commit is contained in:
Wei Huang
2019-07-24 23:39:21 -07:00
parent 3638fd5353
commit 0bff4c27d6
5 changed files with 166 additions and 84 deletions

View File

@@ -1748,7 +1748,7 @@ func EvenPodsSpreadPredicate(pod *v1.Pod, meta PredicateMetadata, nodeInfo *sche
return false, []PredicateFailureReason{ErrTopologySpreadConstraintsNotMatch}, nil
}
selfMatch, err := podMatchesSpreadConstraint(podLabelSet, constraint)
selfMatch, err := PodMatchesSpreadConstraint(podLabelSet, constraint)
if err != nil {
return false, nil, err
}