From dbb7b04c3d3c37519413dc42ed0d12a515d64f91 Mon Sep 17 00:00:00 2001 From: Darren Shepherd Date: Fri, 12 Jul 2019 09:59:03 -0700 Subject: [PATCH] Add option to disable scheduler --- pkg/cli/cmds/server.go | 6 ++++++ pkg/cli/server/server.go | 1 + 2 files changed, 7 insertions(+) diff --git a/pkg/cli/cmds/server.go b/pkg/cli/cmds/server.go index 52bb444d71..d0279529b8 100644 --- a/pkg/cli/cmds/server.go +++ b/pkg/cli/cmds/server.go @@ -31,6 +31,7 @@ type Server struct { StorageKeyFile string AdvertiseIP string AdvertisePort int + DisableScheduler bool } var ServerConfig Server @@ -191,6 +192,11 @@ func NewServerCommand(action func(*cli.Context) error) cli.Command { Value: 0, Destination: &ServerConfig.AdvertisePort, }, + cli.BoolFlag{ + Name: "disable-scheduler", + Usage: "Disable Kubernetes default scheduler", + Destination: &ServerConfig.DisableScheduler, + }, NodeIPFlag, NodeNameFlag, DockerFlag, diff --git a/pkg/cli/server/server.go b/pkg/cli/server/server.go index 05d06fed94..5ea36ba95c 100644 --- a/pkg/cli/server/server.go +++ b/pkg/cli/server/server.go @@ -100,6 +100,7 @@ func run(app *cli.Context, cfg *cmds.Server) error { serverConfig.ControlConfig.DataDir = cfg.DataDir serverConfig.ControlConfig.KubeConfigOutput = cfg.KubeConfigOutput serverConfig.ControlConfig.KubeConfigMode = cfg.KubeConfigMode + serverConfig.ControlConfig.NoScheduler = cfg.DisableScheduler serverConfig.Rootless = cfg.Rootless serverConfig.TLSConfig.HTTPSPort = cfg.HTTPSPort serverConfig.TLSConfig.HTTPPort = cfg.HTTPPort