mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-11-03 15:25:19 +00:00
refactor scheduler factory to use plugin architecture style like credentialprovider and cloudprovider for configuring priority functions and fit predicates
This commit is contained in:
@@ -38,6 +38,7 @@ import (
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/tools"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/scheduler"
|
||||
_ "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/scheduler/algorithmprovider"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/scheduler/factory"
|
||||
|
||||
"github.com/golang/glog"
|
||||
@@ -105,7 +106,7 @@ func RunApiServer(cl *client.Client, etcdClient tools.EtcdClient, addr string, p
|
||||
func RunScheduler(cl *client.Client) {
|
||||
// Scheduler
|
||||
schedulerConfigFactory := factory.NewConfigFactory(cl)
|
||||
schedulerConfig, err := schedulerConfigFactory.Create(nil, nil)
|
||||
schedulerConfig, err := schedulerConfigFactory.Create()
|
||||
if err != nil {
|
||||
glog.Fatal("Couldn't create scheduler config: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user