File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed
Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ by passing a default KubeSchedulerConfiguration file via the environment variabl
1919
2020### Example
2121
22- We will explain the case where you want to add [ nodenumber] ( .. /sample/nodenumber/plugin.go ) plugin as example.
22+ We will explain the case where you want to add [ nodenumber] ( ./sample/nodenumber/plugin.go ) plugin as example.
2323
2424The nodenumber plugin is an example plugin that favors nodes that have the number suffix which is the same as the number suffix of the pod name.
2525And we can configure it via ` NodeNumberArgs ` .
Original file line number Diff line number Diff line change @@ -7,13 +7,9 @@ import (
77 "k8s.io/kubernetes/pkg/scheduler/framework/runtime"
88)
99
10- var (
11- outOfTreeRegistries = runtime.Registry {
12- // TODO(user): add your plugins registries here.
13- }
14-
15- registeredOutOfTreeMultiPointName = []string {}
16- )
10+ var outOfTreeRegistries = runtime.Registry {
11+ // TODO(user): add your plugins registries here.
12+ }
1713
1814// RegisteredMultiPointPluginNames returns all registered multipoint plugin names.
1915// in-tree plugins and your original plugins listed in outOfTreeRegistries above.
@@ -43,6 +39,10 @@ func InTreeMultiPointPluginSet() (configv1.PluginSet, error) {
4339}
4440
4541func OutOfTreeMultiPointPluginNames () []string {
42+ registeredOutOfTreeMultiPointName := make ([]string , 0 , len (outOfTreeRegistries ))
43+ for k := range outOfTreeRegistries {
44+ registeredOutOfTreeMultiPointName = append (registeredOutOfTreeMultiPointName , k )
45+ }
4646 return registeredOutOfTreeMultiPointName
4747}
4848
@@ -57,6 +57,5 @@ func OutOfTreeRegistries() runtime.Registry {
5757func SetOutOfTreeRegistries (r runtime.Registry ) {
5858 for k , v := range r {
5959 outOfTreeRegistries [k ] = v
60- registeredOutOfTreeMultiPointName = append (registeredOutOfTreeMultiPointName , k )
6160 }
6261}
You can’t perform that action at this time.
0 commit comments