Updating priority function weight based on specified configuration

This commit is contained in:
Abhishek Gupta
2015-03-27 17:55:55 -07:00
parent 525bbfd175
commit 142fd773b0
2 changed files with 41 additions and 25 deletions

View File

@@ -59,11 +59,11 @@ func defaultPriorities() util.StringSet {
// spreads pods by minimizing the number of pods (belonging to the same service) on the same minion.
factory.RegisterPriorityConfigFactory(
"ServiceSpreadingPriority",
func(args factory.PluginFactoryArgs) algorithm.PriorityConfig {
return algorithm.PriorityConfig{
Function: algorithm.NewServiceSpreadPriority(args.ServiceLister),
Weight: 1,
}
factory.PriorityConfigFactory{
Function: func(args factory.PluginFactoryArgs) algorithm.PriorityFunction {
return algorithm.NewServiceSpreadPriority(args.ServiceLister)
},
Weight: 1,
},
),
// EqualPriority is a prioritizer function that gives an equal weight of one to all minions