From 2f4a08c54d1493673dd38d3e987645c7b2aad04b Mon Sep 17 00:00:00 2001 From: Xavier Landreville Date: Tue, 1 Oct 2019 11:27:17 -0400 Subject: [PATCH] Add comma-separated no-deploy values This allows no-deploy values to be either specified as multiple --no-deploy invocations, or a single invocation with comma-separated values. --- pkg/cli/server/server.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/cli/server/server.go b/pkg/cli/server/server.go index 43a78e9581..79bff4d948 100644 --- a/pkg/cli/server/server.go +++ b/pkg/cli/server/server.go @@ -132,7 +132,14 @@ func run(app *cli.Context, cfg *cmds.Server) error { serverConfig.ControlConfig.DefaultLocalStoragePath = cfg.DefaultLocalStoragePath } + noDeploys := make([]string, 0) for _, noDeploy := range app.StringSlice("no-deploy") { + for _, splitNoDeploy := range strings.Split(noDeploy, ",") { + noDeploys = append(noDeploys, splitNoDeploy) + } + } + + for _, noDeploy := range noDeploys { if noDeploy == "servicelb" { serverConfig.DisableServiceLB = true continue