Add allowEmptyServices for Docker provider
This commit is contained in:
parent
c51e590591
commit
aff334ffb4
8 changed files with 253 additions and 37 deletions
|
@ -714,3 +714,30 @@ providers:
|
|||
```bash tab="CLI"
|
||||
--providers.docker.tls.insecureSkipVerify=true
|
||||
```
|
||||
|
||||
### `allowEmptyServices`
|
||||
|
||||
_Optional, Default=false_
|
||||
|
||||
If the parameter is set to `true`,
|
||||
any [servers load balancer](../routing/services/index.md#servers-load-balancer) defined for Docker containers is created
|
||||
regardless of the [healthiness](https://docs.docker.com/engine/reference/builder/#healthcheck) of the corresponding containers.
|
||||
It also then stays alive and responsive even at times when it becomes empty,
|
||||
i.e. when all its children containers become unhealthy.
|
||||
This results in `503` HTTP responses instead of `404` ones,
|
||||
in the above cases.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
docker:
|
||||
allowEmptyServices: true
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.docker]
|
||||
allowEmptyServices = true
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.docker.allowEmptyServices=true
|
||||
```
|
||||
|
|
|
@ -519,6 +519,9 @@ Watch Consul API events. (Default: ```false```)
|
|||
`--providers.docker`:
|
||||
Enable Docker backend with default settings. (Default: ```false```)
|
||||
|
||||
`--providers.docker.allowemptyservices`:
|
||||
Disregards the Docker containers health checks with respect to the creation or removal of the corresponding services. (Default: ```false```)
|
||||
|
||||
`--providers.docker.constraints`:
|
||||
Constraints is an expression that Traefik matches against the container's labels to determine whether to create any route for that container.
|
||||
|
||||
|
|
|
@ -519,6 +519,9 @@ KV Username
|
|||
`TRAEFIK_PROVIDERS_DOCKER`:
|
||||
Enable Docker backend with default settings. (Default: ```false```)
|
||||
|
||||
`TRAEFIK_PROVIDERS_DOCKER_ALLOWEMPTYSERVICES`:
|
||||
Disregards the Docker containers health checks with respect to the creation or removal of the corresponding services. (Default: ```false```)
|
||||
|
||||
`TRAEFIK_PROVIDERS_DOCKER_CONSTRAINTS`:
|
||||
Constraints is an expression that Traefik matches against the container's labels to determine whether to create any route for that container.
|
||||
|
||||
|
|
|
@ -67,6 +67,7 @@
|
|||
network = "foobar"
|
||||
swarmModeRefreshSeconds = "42s"
|
||||
httpClientTimeout = "42s"
|
||||
allowEmptyServices = true
|
||||
[providers.docker.tls]
|
||||
ca = "foobar"
|
||||
caOptional = true
|
||||
|
|
|
@ -79,6 +79,7 @@ providers:
|
|||
network: foobar
|
||||
swarmModeRefreshSeconds: 42s
|
||||
httpClientTimeout: 42s
|
||||
allowEmptyServices: true
|
||||
file:
|
||||
directory: foobar
|
||||
watch: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue