Let swarmkit handle cluster defaults in swarm init if not specified
This fix tries to address the issue raised in 24958 where previously `docker swarm init` will automatically fill in all the default value (instead of letting swarmkit to handle the default). This fix update the `swarm init` so that initial value are passed only when a flag change has been detected. This fix fixes 24958. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
@ -59,7 +59,7 @@ func runInit(dockerCli *command.DockerCli, flags *pflag.FlagSet, opts initOption
|
||||
ListenAddr: opts.listenAddr.String(),
|
||||
AdvertiseAddr: opts.advertiseAddr,
|
||||
ForceNewCluster: opts.forceNewCluster,
|
||||
Spec: opts.swarmOptions.ToSpec(),
|
||||
Spec: opts.swarmOptions.ToSpec(flags),
|
||||
}
|
||||
|
||||
nodeID, err := client.SwarmInit(ctx, req)
|
||||
|
||||
Reference in New Issue
Block a user