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