mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Merge pull request #6188 from abhgupta/abhgupta-dev
Minor fixes for scheduler priority configuration
This commit is contained in:
commit
10b4fe6f30
@ -25,6 +25,10 @@ import (
|
||||
|
||||
func init() {
|
||||
factory.RegisterAlgorithmProvider(factory.DefaultProvider, defaultPredicates(), defaultPriorities())
|
||||
// EqualPriority is a prioritizer function that gives an equal weight of one to all minions
|
||||
// Register the priority function so that its available
|
||||
// but do not include it as part of the default priorities
|
||||
factory.RegisterPriorityFunction("EqualPriority", algorithm.EqualPriority, 1)
|
||||
}
|
||||
|
||||
func defaultPredicates() util.StringSet {
|
||||
@ -66,7 +70,5 @@ func defaultPriorities() util.StringSet {
|
||||
Weight: 1,
|
||||
},
|
||||
),
|
||||
// EqualPriority is a prioritizer function that gives an equal weight of one to all minions
|
||||
factory.RegisterPriorityFunction("EqualPriority", algorithm.EqualPriority, 0),
|
||||
)
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ func RegisterPriorityFunction(name string, function algorithm.PriorityFunction,
|
||||
Function: func(PluginFactoryArgs) algorithm.PriorityFunction {
|
||||
return function
|
||||
},
|
||||
Weight: 1,
|
||||
Weight: weight,
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user