EvenPodsSpread: Define a new Predicate

This commit is contained in:
Wei Huang
2019-04-30 16:13:45 -07:00
parent 1dac5fd14a
commit 08e7b3bacb
3 changed files with 25 additions and 1 deletions

View File

@@ -87,6 +87,12 @@ func ApplyFeatureGates() {
klog.Infof("TaintNodesByCondition is enabled, PodToleratesNodeTaints predicate is mandatory")
}
// Only register EvenPodsSpreadPredicate if the feature is enabled
if utilfeature.DefaultFeatureGate.Enabled(features.EvenPodsSpread) {
factory.InsertPredicateKeyToAlgorithmProviderMap(predicates.EvenPodsSpreadPred)
factory.RegisterFitPredicate(predicates.EvenPodsSpreadPred, predicates.EvenPodsSpreadPredicate)
}
// Prioritizes nodes that satisfy pod's resource limits
if utilfeature.DefaultFeatureGate.Enabled(features.ResourceLimitsPriorityFunction) {
klog.Infof("Registering resourcelimits priority function")