cleanup scheduler's in-tree plugins registry naming
This commit is contained in:
@@ -2,7 +2,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["default_registry.go"],
|
||||
srcs = ["registry.go"],
|
||||
importpath = "k8s.io/kubernetes/pkg/scheduler/framework/plugins",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
@@ -72,7 +72,7 @@ filegroup(
|
||||
|
||||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["default_registry_test.go"],
|
||||
srcs = ["registry_test.go"],
|
||||
embed = [":go_default_library"],
|
||||
deps = [
|
||||
"//pkg/scheduler/apis/config:go_default_library",
|
||||
|
||||
@@ -52,10 +52,10 @@ type RegistryArgs struct {
|
||||
VolumeBinder *volumebinder.VolumeBinder
|
||||
}
|
||||
|
||||
// NewDefaultRegistry builds the default registry with all the in-tree plugins.
|
||||
// This is the registry that Kubernetes default scheduler uses. A scheduler that runs out of tree
|
||||
// plugins can register additional plugins through the WithFrameworkOutOfTreeRegistry option.
|
||||
func NewDefaultRegistry(args *RegistryArgs) framework.Registry {
|
||||
// NewInTreeRegistry builds the registry with all the in-tree plugins.
|
||||
// A scheduler that runs out of tree plugins can register additional plugins
|
||||
// through the WithFrameworkOutOfTreeRegistry option.
|
||||
func NewInTreeRegistry(args *RegistryArgs) framework.Registry {
|
||||
return framework.Registry{
|
||||
defaultpodtopologyspread.Name: defaultpodtopologyspread.New,
|
||||
imagelocality.Name: imagelocality.New,
|
||||
@@ -115,8 +115,8 @@ type ConfigProducerRegistry struct {
|
||||
PriorityToConfigProducer map[string]ConfigProducer
|
||||
}
|
||||
|
||||
// NewDefaultConfigProducerRegistry creates a new producer registry.
|
||||
func NewDefaultConfigProducerRegistry() *ConfigProducerRegistry {
|
||||
// NewConfigProducerRegistry creates a new producer registry.
|
||||
func NewConfigProducerRegistry() *ConfigProducerRegistry {
|
||||
registry := &ConfigProducerRegistry{
|
||||
PredicateToConfigProducer: make(map[string]ConfigProducer),
|
||||
PriorityToConfigProducer: make(map[string]ConfigProducer),
|
||||
@@ -41,7 +41,7 @@ func produceConfig(keys []string, producersMap map[string]ConfigProducer, args C
|
||||
}
|
||||
|
||||
func TestRegisterConfigProducers(t *testing.T) {
|
||||
registry := NewDefaultConfigProducerRegistry()
|
||||
registry := NewConfigProducerRegistry()
|
||||
testPredicateName1 := "testPredicate1"
|
||||
testFilterName1 := "testFilter1"
|
||||
registry.RegisterPredicate(testPredicateName1,
|
||||
Reference in New Issue
Block a user