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{
|
||||
|
|
@ -188,15 +193,16 @@ func cmdCreateInner(c CommandLine, api libmachine.API) error {
|
|||
InstallURL: c.String("engine-install-url"),
|
||||
},
|
||||
SwarmOptions: &swarm.Options{
|
||||
IsSwarm: c.Bool("swarm"),
|
||||
Image: c.String("swarm-image"),
|
||||
Master: c.Bool("swarm-master"),
|
||||
Discovery: c.String("swarm-discovery"),
|
||||
Address: c.String("swarm-addr"),
|
||||
Host: c.String("swarm-host"),
|
||||
Strategy: c.String("swarm-strategy"),
|
||||
ArbitraryFlags: c.StringSlice("swarm-opt"),
|
||||
IsExperimental: c.Bool("swarm-experimental"),
|
||||
IsSwarm: c.Bool("swarm"),
|
||||
Image: c.String("swarm-image"),
|
||||
Master: c.Bool("swarm-master"),
|
||||
Discovery: c.String("swarm-discovery"),
|
||||
Address: c.String("swarm-addr"),
|
||||
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)
|
||||
|
|
|
|||
|
|
@ -5,16 +5,17 @@ const (
|
|||
)
|
||||
|
||||
type Options struct {
|
||||
IsSwarm bool
|
||||
Address string
|
||||
Discovery string
|
||||
Master bool
|
||||
Host string
|
||||
Image string
|
||||
Strategy string
|
||||
Heartbeat int
|
||||
Overcommit float64
|
||||
ArbitraryFlags []string
|
||||
Env []string
|
||||
IsExperimental bool
|
||||
IsSwarm bool
|
||||
Address string
|
||||
Discovery string
|
||||
Master bool
|
||||
Host string
|
||||
Image string
|
||||
Strategy string
|
||||
Heartbeat int
|
||||
Overcommit float64
|
||||
ArbitraryFlags []string
|
||||
ArbitraryJoinFlags []string
|
||||
Env []string
|
||||
IsExperimental bool
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue