Eliminate running paths of Predicates in scheduler

- eliminate running paths of Predicates in scheduler; use Filter Plugins instead.
- refactor all unit tests
- adjust the TestPreemptWithPermitPlugin integration test
This commit is contained in:
Wei Huang
2019-12-10 10:12:03 -08:00
parent 30a5db136f
commit dc3d1bd238
17 changed files with 720 additions and 505 deletions

View File

@@ -48,7 +48,7 @@ func (pl *InterPodAffinity) Name() string {
// Filter invoked at the filter extension point.
func (pl *InterPodAffinity) Filter(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, nodeInfo *nodeinfo.NodeInfo) *framework.Status {
meta, ok := migration.PredicateMetadata(cycleState).(predicates.Metadata)
meta, ok := migration.CovertStateRefToPredMeta(migration.PredicateMetadata(cycleState))
if !ok {
return migration.ErrorToFrameworkStatus(fmt.Errorf("%+v convert to predicates.Metadata error", cycleState))
}