Skip to content

Commit

Permalink
Merge pull request kubernetes#6188 from abhgupta/abhgupta-dev
Browse files Browse the repository at this point in the history
Minor fixes for scheduler priority configuration
  • Loading branch information
lavalamp committed Mar 30, 2015
2 parents 795cd38 + 490dd1b commit 10b4fe6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions plugin/pkg/scheduler/algorithmprovider/defaults/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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),
)
}
2 changes: 1 addition & 1 deletion plugin/pkg/scheduler/factory/plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func RegisterPriorityFunction(name string, function algorithm.PriorityFunction,
Function: func(PluginFactoryArgs) algorithm.PriorityFunction {
return function
},
Weight: 1,
Weight: weight,
})
}

Expand Down

0 comments on commit 10b4fe6

Please sign in to comment.