File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,8 @@ import (
58
58
"k8s.io/klog"
59
59
)
60
60
61
+ var frameworkRegistry = framework .NewRegistry ()
62
+
61
63
// NewSchedulerCommand creates a *cobra.Command object with default parameters
62
64
func NewSchedulerCommand () * cobra.Command {
63
65
opts , err := options .NewOptions ()
@@ -175,7 +177,7 @@ func Run(cc schedulerserverconfig.CompletedConfig, stopCh <-chan struct{}) error
175
177
cc .Recorder ,
176
178
cc .ComponentConfig .AlgorithmSource ,
177
179
stopCh ,
178
- framework . NewRegistry () ,
180
+ frameworkRegistry ,
179
181
cc .ComponentConfig .Plugins ,
180
182
cc .ComponentConfig .PluginConfig ,
181
183
scheduler .WithName (cc .ComponentConfig .SchedulerName ),
@@ -326,3 +328,9 @@ func newHealthzHandler(config *kubeschedulerconfig.KubeSchedulerConfiguration, s
326
328
}
327
329
return pathRecorderMux
328
330
}
331
+
332
+ // RegisterFrameworkPlugin adds a new plugin to the registry. If a plugin with the same name
333
+ // exists, it returns an error.
334
+ func RegisterFrameworkPlugin (name string , factory framework.PluginFactory ) error {
335
+ return frameworkRegistry .Register (name , factory )
336
+ }
You can’t perform that action at this time.
0 commit comments