mirror of https://github.com/docker/cli.git
Allow swarm init with `--availability=drain`
This fix adds a new flag `--availability` to `swarm join`. Related documentation has been updated. An integration test has been added. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
parent
f4d26add25
commit
4a16aa2ece
|
@ -23,6 +23,7 @@ Initialize a swarm
|
|||
Options:
|
||||
--advertise-addr string Advertised address (format: <ip|interface>[:port])
|
||||
--autolock Enable manager autolocking (requiring an unlock key to start a stopped manager)
|
||||
--availability string Availability of the node (active/pause/drain) (default "active")
|
||||
--cert-expiry duration Validity period for node certificates (ns|us|ms|s|m|h) (default 2160h0m0s)
|
||||
--dispatcher-heartbeat duration Dispatcher heartbeat period (ns|us|ms|s|m|h) (default 5s)
|
||||
--external-ca external-ca Specifications of one or more certificate signing endpoints
|
||||
|
@ -133,6 +134,16 @@ Snapshots compact the Raft log and allow for more efficient transfer of the
|
|||
state to new managers. However, there is a performance cost to taking snapshots
|
||||
frequently.
|
||||
|
||||
### `--availability`
|
||||
|
||||
This flag specifies the availability of the node at the time the node joins a master.
|
||||
Possible availability values are `active`, `pause`, or `drain`.
|
||||
|
||||
This flag is useful in certain situations. For example, a cluster may want to have
|
||||
dedicated manager nodes that are not served as worker nodes. This could be achieved
|
||||
by passing `--availability=drain` to `docker swarm init`.
|
||||
|
||||
|
||||
## Related information
|
||||
|
||||
* [swarm join](swarm_join.md)
|
||||
|
|
Loading…
Reference in New Issue