mirror of https://github.com/docker/docs.git
Merge pull request #3387 from ndeloof/fix-3287
Introduce —swarm-join-opt to pass options to agent nodes Fixes #3285 Fix regression introduced by PR #3287
This commit is contained in:
commit
25c3fa64a4
|
|
@ -105,7 +105,12 @@ var (
|
|||
},
|
||||
cli.StringSliceFlag{
|
||||
Name: "swarm-opt",
|
||||
Usage: "Define arbitrary flags for swarm",
|
||||
Usage: "Define arbitrary flags for Swarm master",
|
||||
Value: &cli.StringSlice{},
|
||||
},
|
||||
cli.StringSliceFlag{
|
||||
Name: "swarm-join-opt",
|
||||
Usage: "Define arbitrary flags for Swarm join",
|
||||
Value: &cli.StringSlice{},
|
||||
},
|
||||
cli.StringFlag{
|
||||
|
|
@ -196,6 +201,7 @@ func cmdCreateInner(c CommandLine, api libmachine.API) error {
|
|||
Host: c.String("swarm-host"),
|
||||
Strategy: c.String("swarm-strategy"),
|
||||
ArbitraryFlags: c.StringSlice("swarm-opt"),
|
||||
ArbitraryJoinFlags: c.StringSlice("swarm-join-opt"),
|
||||
IsExperimental: c.Bool("swarm-experimental"),
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ func configureSwarm(p Provisioner, swarmOptions swarm.Options, authOptions auth.
|
|||
"--advertise",
|
||||
advertiseInfo,
|
||||
}
|
||||
for _, option := range swarmOptions.ArbitraryFlags {
|
||||
for _, option := range swarmOptions.ArbitraryJoinFlags {
|
||||
cmdWorker = append(cmdWorker, "--"+option)
|
||||
}
|
||||
cmdWorker = append(cmdWorker, swarmOptions.Discovery)
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ type Options struct {
|
|||
Heartbeat int
|
||||
Overcommit float64
|
||||
ArbitraryFlags []string
|
||||
ArbitraryJoinFlags []string
|
||||
Env []string
|
||||
IsExperimental bool
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue