mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
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.
This commit is contained in:
parent
cac41db0e1
commit
2f4a08c54d
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user