Add --health-* commands to service create and update

A HealthConfig entry was added to the ContainerSpec associated with the
service being created or updated.

Signed-off-by: Cezar Sa Espinola <cezarsa@gmail.com>
master
Cezar Sa Espinola 2016-10-13 15:28:32 -03:00 committed by Tibor Vass
parent 5934d2a0ed
commit 836b1a7d0a
4 changed files with 20 additions and 0 deletions

View File

@ -2574,6 +2574,10 @@ _docker_service_update() {
--env -e --env -e
--force --force
--group-add --group-add
--health-cmd
--health-interval
--health-retries
--health-timeout
--label -l --label -l
--limit-cpu --limit-cpu
--limit-memory --limit-memory
@ -2581,6 +2585,7 @@ _docker_service_update() {
--log-opt --log-opt
--mount --mount
--network --network
--no-healthcheck
--publish -p --publish -p
--replicas --replicas
--reserve-cpu --reserve-cpu

View File

@ -1089,6 +1089,10 @@ __docker_service_subcommand() {
"($help)--endpoint-mode=[Placement constraints]:mode:(dnsrr vip)" "($help)--endpoint-mode=[Placement constraints]:mode:(dnsrr vip)"
"($help)*"{-e=,--env=}"[Set environment variables]:env: " "($help)*"{-e=,--env=}"[Set environment variables]:env: "
"($help)*--group-add=[Add additional user groups to the container]:group:_groups" "($help)*--group-add=[Add additional user groups to the container]:group:_groups"
"($help)--health-cmd=[Command to run to check health]:command: "
"($help)--health-interval=[Time between running the check]:time: "
"($help)--health-retries=[Consecutive failures needed to report unhealthy]:retries:(1 2 3 4 5)"
"($help)--health-timeout=[Maximum time to allow one check to run]:time: "
"($help)*--label=[Service labels]:label: " "($help)*--label=[Service labels]:label: "
"($help)--limit-cpu=[Limit CPUs]:value: " "($help)--limit-cpu=[Limit CPUs]:value: "
"($help)--limit-memory=[Limit Memory]:value: " "($help)--limit-memory=[Limit Memory]:value: "
@ -1096,6 +1100,7 @@ __docker_service_subcommand() {
"($help)*--log-opt=[Logging driver options]:log driver options:__docker_log_options" "($help)*--log-opt=[Logging driver options]:log driver options:__docker_log_options"
"($help)*--mount=[Attach a mount to the service]:mount: " "($help)*--mount=[Attach a mount to the service]:mount: "
"($help)*--network=[Network attachments]:network: " "($help)*--network=[Network attachments]:network: "
"($help)--no-healthcheck[Disable any container-specified HEALTHCHECK]"
"($help)*"{-p=,--publish=}"[Publish a port as a node port]:port: " "($help)*"{-p=,--publish=}"[Publish a port as a node port]:port: "
"($help)--replicas=[Number of tasks]:replicas: " "($help)--replicas=[Number of tasks]:replicas: "
"($help)--reserve-cpu=[Reserve CPUs]:value: " "($help)--reserve-cpu=[Reserve CPUs]:value: "

View File

@ -27,6 +27,10 @@ Options:
-e, --env value Set environment variables (default []) -e, --env value Set environment variables (default [])
--env-file value Read in a file of environment variables (default []) --env-file value Read in a file of environment variables (default [])
--group-add value Add additional user groups to the container (default []) --group-add value Add additional user groups to the container (default [])
--health-cmd string Command to run to check health
--health-interval duration Time between running the check
--health-retries int Consecutive failures needed to report unhealthy
--health-timeout duration Maximum time to allow one check to run
--help Print usage --help Print usage
-l, --label value Service labels (default []) -l, --label value Service labels (default [])
--limit-cpu value Limit CPUs (default 0.000) --limit-cpu value Limit CPUs (default 0.000)
@ -37,6 +41,7 @@ Options:
--mount value Attach a mount to the service --mount value Attach a mount to the service
--name string Service name --name string Service name
--network value Network attachments (default []) --network value Network attachments (default [])
--no-healthcheck Disable any container-specified HEALTHCHECK
-p, --publish value Publish a port as a node port (default []) -p, --publish value Publish a port as a node port (default [])
--replicas value Number of tasks (default none) --replicas value Number of tasks (default none)
--reserve-cpu value Reserve CPUs (default 0.000) --reserve-cpu value Reserve CPUs (default 0.000)

View File

@ -32,6 +32,10 @@ Options:
--force Force update even if no changes require it --force Force update even if no changes require it
--group-add value Add additional user groups to the container (default []) --group-add value Add additional user groups to the container (default [])
--group-rm value Remove previously added user groups from the container (default []) --group-rm value Remove previously added user groups from the container (default [])
--health-cmd string Command to run to check health
--health-interval duration Time between running the check
--health-retries int Consecutive failures needed to report unhealthy
--health-timeout duration Maximum time to allow one check to run
--help Print usage --help Print usage
--image string Service image tag --image string Service image tag
--label-add value Add or update service labels (default []) --label-add value Add or update service labels (default [])
@ -42,6 +46,7 @@ Options:
--log-opt value Logging driver options (default []) --log-opt value Logging driver options (default [])
--mount-add value Add or update a mount on a service --mount-add value Add or update a mount on a service
--mount-rm value Remove a mount by its target path (default []) --mount-rm value Remove a mount by its target path (default [])
--no-healthcheck Disable any container-specified HEALTHCHECK
--publish-add value Add or update a published port (default []) --publish-add value Add or update a published port (default [])
--publish-rm value Remove a published port by its target port (default []) --publish-rm value Remove a published port by its target port (default [])
--replicas value Number of tasks (default none) --replicas value Number of tasks (default none)