Added a noop plugin to make sure we have the dependencies worked out for the default registry of the scheduler framework.

This commit is contained in:
Abdullah Gharaibeh
2019-09-12 15:24:32 -04:00
parent 85827dc224
commit 3174d9c847
19 changed files with 164 additions and 34 deletions

View File

@@ -54,6 +54,7 @@ import (
_ "k8s.io/kubernetes/pkg/scheduler/algorithmprovider"
schedulerapi "k8s.io/kubernetes/pkg/scheduler/api"
"k8s.io/kubernetes/pkg/scheduler/factory"
schedulerplugins "k8s.io/kubernetes/pkg/scheduler/framework/plugins"
schedulerframework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1"
taintutils "k8s.io/kubernetes/pkg/util/taints"
"k8s.io/kubernetes/test/integration/framework"
@@ -156,7 +157,7 @@ func initTestScheduler(
policy *schedulerapi.Policy,
) *testContext {
// Pod preemption is enabled by default scheduler configuration.
return initTestSchedulerWithOptions(t, context, setPodInformer, policy, schedulerframework.NewRegistry(),
return initTestSchedulerWithOptions(t, context, setPodInformer, policy, schedulerplugins.NewDefaultRegistry(),
nil, []schedulerconfig.PluginConfig{}, false, time.Second)
}
@@ -284,7 +285,7 @@ func initTest(t *testing.T, nsPrefix string) *testContext {
func initTestDisablePreemption(t *testing.T, nsPrefix string) *testContext {
return initTestSchedulerWithOptions(
t, initTestMaster(t, nsPrefix, nil), true, nil,
schedulerframework.NewRegistry(), nil, []schedulerconfig.PluginConfig{},
schedulerplugins.NewDefaultRegistry(), nil, []schedulerconfig.PluginConfig{},
true, time.Second)
}