mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #29450 from yongtang/29291-no-default-replicas-output
Fix misleading defaults for service create/update
This commit is contained in:
commit
b1cb897998
4 changed files with 22 additions and 22 deletions
|
@ -84,7 +84,7 @@ func (d *DurationOpt) String() string {
|
||||||
if d.value != nil {
|
if d.value != nil {
|
||||||
return d.value.String()
|
return d.value.String()
|
||||||
}
|
}
|
||||||
return "none"
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
// Value returns the time.Duration
|
// Value returns the time.Duration
|
||||||
|
@ -114,7 +114,7 @@ func (i *Uint64Opt) String() string {
|
||||||
if i.value != nil {
|
if i.value != nil {
|
||||||
return fmt.Sprintf("%v", *i.value)
|
return fmt.Sprintf("%v", *i.value)
|
||||||
}
|
}
|
||||||
return "none"
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
// Value returns the uint64
|
// Value returns the uint64
|
||||||
|
|
|
@ -59,7 +59,7 @@ func TestUint64OptString(t *testing.T) {
|
||||||
assert.Equal(t, opt.String(), "2345678")
|
assert.Equal(t, opt.String(), "2345678")
|
||||||
|
|
||||||
opt = Uint64Opt{}
|
opt = Uint64Opt{}
|
||||||
assert.Equal(t, opt.String(), "none")
|
assert.Equal(t, opt.String(), "")
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestUint64OptSetAndValue(t *testing.T) {
|
func TestUint64OptSetAndValue(t *testing.T) {
|
||||||
|
|
|
@ -31,9 +31,9 @@ Options:
|
||||||
--env-file list Read in a file of environment variables (default [])
|
--env-file list Read in a file of environment variables (default [])
|
||||||
--group list Set one or more supplementary user groups for the container (default [])
|
--group list Set one or more supplementary user groups for the container (default [])
|
||||||
--health-cmd string Command to run to check health
|
--health-cmd string Command to run to check health
|
||||||
--health-interval duration Time between running the check (ns|us|ms|s|m|h) (default none)
|
--health-interval duration Time between running the check (ns|us|ms|s|m|h)
|
||||||
--health-retries int Consecutive failures needed to report unhealthy
|
--health-retries int Consecutive failures needed to report unhealthy
|
||||||
--health-timeout duration Maximum time to allow one check to run (ns|us|ms|s|m|h) (default none)
|
--health-timeout duration Maximum time to allow one check to run (ns|us|ms|s|m|h)
|
||||||
--help Print usage
|
--help Print usage
|
||||||
--host list Set one or more custom host-to-IP mappings (host:ip) (default [])
|
--host list Set one or more custom host-to-IP mappings (host:ip) (default [])
|
||||||
--hostname string Container hostname
|
--hostname string Container hostname
|
||||||
|
@ -47,16 +47,16 @@ Options:
|
||||||
--name string Service name
|
--name string Service name
|
||||||
--network list Network attachments (default [])
|
--network list Network attachments (default [])
|
||||||
--no-healthcheck Disable any container-specified HEALTHCHECK
|
--no-healthcheck Disable any container-specified HEALTHCHECK
|
||||||
-p, --publish list Publish a port as a node port (default [])
|
-p, --publish port Publish a port as a node port
|
||||||
--replicas uint Number of tasks (default none)
|
--replicas uint Number of tasks
|
||||||
--reserve-cpu decimal Reserve CPUs (default 0.000)
|
--reserve-cpu decimal Reserve CPUs (default 0.000)
|
||||||
--reserve-memory bytes Reserve Memory (default 0 B)
|
--reserve-memory bytes Reserve Memory (default 0 B)
|
||||||
--restart-condition string Restart when condition is met (none, on-failure, or any)
|
--restart-condition string Restart when condition is met (none, on-failure, or any)
|
||||||
--restart-delay duration Delay between restart attempts (ns|us|ms|s|m|h) (default none)
|
--restart-delay duration Delay between restart attempts (ns|us|ms|s|m|h)
|
||||||
--restart-max-attempts uint Maximum number of restarts before giving up (default none)
|
--restart-max-attempts uint Maximum number of restarts before giving up
|
||||||
--restart-window duration Window used to evaluate the restart policy (ns|us|ms|s|m|h) (default none)
|
--restart-window duration Window used to evaluate the restart policy (ns|us|ms|s|m|h)
|
||||||
--secret value Specify secrets to expose to the service (default [])
|
--secret secret Specify secrets to expose to the service
|
||||||
--stop-grace-period duration Time to wait before force killing a container (ns|us|ms|s|m|h) (default none)
|
--stop-grace-period duration Time to wait before force killing a container (ns|us|ms|s|m|h)
|
||||||
-t, --tty Allocate a pseudo-TTY
|
-t, --tty Allocate a pseudo-TTY
|
||||||
--update-delay duration Delay between updates (ns|us|ms|s|m|h) (default 0s)
|
--update-delay duration Delay between updates (ns|us|ms|s|m|h) (default 0s)
|
||||||
--update-failure-action string Action on update failure (pause|continue) (default "pause")
|
--update-failure-action string Action on update failure (pause|continue) (default "pause")
|
||||||
|
|
|
@ -39,9 +39,9 @@ Options:
|
||||||
--group-add list Add an additional supplementary user group to the container (default [])
|
--group-add list Add an additional supplementary user group to the container (default [])
|
||||||
--group-rm list Remove a previously added supplementary user group from the container (default [])
|
--group-rm list Remove a previously added supplementary user group from the container (default [])
|
||||||
--health-cmd string Command to run to check health
|
--health-cmd string Command to run to check health
|
||||||
--health-interval duration Time between running the check (ns|us|ms|s|m|h) (default none)
|
--health-interval duration Time between running the check (ns|us|ms|s|m|h)
|
||||||
--health-retries int Consecutive failures needed to report unhealthy
|
--health-retries int Consecutive failures needed to report unhealthy
|
||||||
--health-timeout duration Maximum time to allow one check to run (ns|us|ms|s|m|h) (default none)
|
--health-timeout duration Maximum time to allow one check to run (ns|us|ms|s|m|h)
|
||||||
--help Print usage
|
--help Print usage
|
||||||
--host-add list Add or update a custom host-to-IP mapping (host:ip) (default [])
|
--host-add list Add or update a custom host-to-IP mapping (host:ip) (default [])
|
||||||
--host-rm list Remove a custom host-to-IP mapping (host:ip) (default [])
|
--host-rm list Remove a custom host-to-IP mapping (host:ip) (default [])
|
||||||
|
@ -56,19 +56,19 @@ Options:
|
||||||
--mount-add mount Add or update a mount on a service
|
--mount-add mount Add or update a mount on a service
|
||||||
--mount-rm list Remove a mount by its target path (default [])
|
--mount-rm list Remove a mount by its target path (default [])
|
||||||
--no-healthcheck Disable any container-specified HEALTHCHECK
|
--no-healthcheck Disable any container-specified HEALTHCHECK
|
||||||
--publish-add list Add or update a published port (default [])
|
--publish-add port Add or update a published port
|
||||||
--publish-rm list Remove a published port by its target port (default [])
|
--publish-rm port Remove a published port by its target port
|
||||||
--replicas uint Number of tasks (default none)
|
--replicas uint Number of tasks
|
||||||
--reserve-cpu decimal Reserve CPUs (default 0.000)
|
--reserve-cpu decimal Reserve CPUs (default 0.000)
|
||||||
--reserve-memory bytes Reserve Memory (default 0 B)
|
--reserve-memory bytes Reserve Memory (default 0 B)
|
||||||
--restart-condition string Restart when condition is met (none, on-failure, or any)
|
--restart-condition string Restart when condition is met (none, on-failure, or any)
|
||||||
--restart-delay duration Delay between restart attempts (ns|us|ms|s|m|h) (default none)
|
--restart-delay duration Delay between restart attempts (ns|us|ms|s|m|h)
|
||||||
--restart-max-attempts uint Maximum number of restarts before giving up (default none)
|
--restart-max-attempts uint Maximum number of restarts before giving up
|
||||||
--restart-window duration Window used to evaluate the restart policy (ns|us|ms|s|m|h) (default none)
|
--restart-window duration Window used to evaluate the restart policy (ns|us|ms|s|m|h)
|
||||||
--rollback Rollback to previous specification
|
--rollback Rollback to previous specification
|
||||||
--secret-add list Add a secret (default [])
|
--secret-add secret Add or update a secret on a service
|
||||||
--secret-rm list Remove a secret (default [])
|
--secret-rm list Remove a secret (default [])
|
||||||
--stop-grace-period duration Time to wait before force killing a container (ns|us|ms|s|m|h) (default none)
|
--stop-grace-period duration Time to wait before force killing a container (ns|us|ms|s|m|h)
|
||||||
-t, --tty Allocate a pseudo-TTY
|
-t, --tty Allocate a pseudo-TTY
|
||||||
--update-delay duration Delay between updates (ns|us|ms|s|m|h) (default 0s)
|
--update-delay duration Delay between updates (ns|us|ms|s|m|h) (default 0s)
|
||||||
--update-failure-action string Action on update failure (pause|continue) (default "pause")
|
--update-failure-action string Action on update failure (pause|continue) (default "pause")
|
||||||
|
|
Loading…
Reference in a new issue