Move EvenPodsSpread metadata computation logic as a PreFilter Plugin

This commit is contained in:
Wei Huang
2019-12-11 23:44:37 -08:00
parent efe159e8d2
commit 468aebc17f
15 changed files with 408 additions and 740 deletions

View File

@@ -58,6 +58,7 @@ func defaultPredicates() sets.String {
// The returned function is used to restore the state of registered predicates/priorities
// when this function is called, and should be called in tests which may modify the value
// of a feature gate temporarily.
// TODO(Huang-Wei): refactor this function to have a clean way to disable/enable plugins.
func ApplyFeatureGates() (restore func()) {
snapshot := scheduler.RegisteredPredicatesAndPrioritiesSnapshot()