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{
|
cli.StringSliceFlag{
|
||||||
Name: "swarm-opt",
|
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{},
|
Value: &cli.StringSlice{},
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
|
|
@ -196,6 +201,7 @@ func cmdCreateInner(c CommandLine, api libmachine.API) error {
|
||||||
Host: c.String("swarm-host"),
|
Host: c.String("swarm-host"),
|
||||||
Strategy: c.String("swarm-strategy"),
|
Strategy: c.String("swarm-strategy"),
|
||||||
ArbitraryFlags: c.StringSlice("swarm-opt"),
|
ArbitraryFlags: c.StringSlice("swarm-opt"),
|
||||||
|
ArbitraryJoinFlags: c.StringSlice("swarm-join-opt"),
|
||||||
IsExperimental: c.Bool("swarm-experimental"),
|
IsExperimental: c.Bool("swarm-experimental"),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@ func configureSwarm(p Provisioner, swarmOptions swarm.Options, authOptions auth.
|
||||||
"--advertise",
|
"--advertise",
|
||||||
advertiseInfo,
|
advertiseInfo,
|
||||||
}
|
}
|
||||||
for _, option := range swarmOptions.ArbitraryFlags {
|
for _, option := range swarmOptions.ArbitraryJoinFlags {
|
||||||
cmdWorker = append(cmdWorker, "--"+option)
|
cmdWorker = append(cmdWorker, "--"+option)
|
||||||
}
|
}
|
||||||
cmdWorker = append(cmdWorker, swarmOptions.Discovery)
|
cmdWorker = append(cmdWorker, swarmOptions.Discovery)
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ type Options struct {
|
||||||
Heartbeat int
|
Heartbeat int
|
||||||
Overcommit float64
|
Overcommit float64
|
||||||
ArbitraryFlags []string
|
ArbitraryFlags []string
|
||||||
|
ArbitraryJoinFlags []string
|
||||||
Env []string
|
Env []string
|
||||||
IsExperimental bool
|
IsExperimental bool
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue