Fix default algorithm provider priority insertion

This commit is contained in:
ravisantoshgudimetla
2018-10-24 16:32:19 -04:00
parent 04d3949048
commit fad6b326e3
4 changed files with 34 additions and 13 deletions

View File

@@ -167,6 +167,17 @@ func InsertPredicateKeyToAlgorithmProviderMap(key string) {
return
}
// InsertPriorityKeyToAlgorithmProviderMap inserts a priority function to all algorithmProviders which are in algorithmProviderMap.
func InsertPriorityKeyToAlgorithmProviderMap(key string) {
schedulerFactoryMutex.Lock()
defer schedulerFactoryMutex.Unlock()
for _, provider := range algorithmProviderMap {
provider.PriorityFunctionKeys.Insert(key)
}
return
}
// RegisterMandatoryFitPredicate registers a fit predicate with the algorithm registry, the predicate is used by
// kubelet, DaemonSet; it is always included in configuration. Returns the name with which the predicate was
// registered.