mirror of https://github.com/k3s-io/k3s
Merge pull request #851 from MagnaXSoftware/switch-string-slice
Add comma-separated no-deploy valuespull/908/head
commit
9e14d3e470
|
@ -134,7 +134,14 @@ func run(app *cli.Context, cfg *cmds.Server) error {
|
||||||
serverConfig.ControlConfig.DefaultLocalStoragePath = cfg.DefaultLocalStoragePath
|
serverConfig.ControlConfig.DefaultLocalStoragePath = cfg.DefaultLocalStoragePath
|
||||||
}
|
}
|
||||||
|
|
||||||
|
noDeploys := make([]string, 0)
|
||||||
for _, noDeploy := range app.StringSlice("no-deploy") {
|
for _, noDeploy := range app.StringSlice("no-deploy") {
|
||||||
|
for _, splitNoDeploy := range strings.Split(noDeploy, ",") {
|
||||||
|
noDeploys = append(noDeploys, splitNoDeploy)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, noDeploy := range noDeploys {
|
||||||
if noDeploy == "servicelb" {
|
if noDeploy == "servicelb" {
|
||||||
serverConfig.DisableServiceLB = true
|
serverConfig.DisableServiceLB = true
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue