Fix default value of docker client timeout

This commit is contained in:
Kevin Pollet 2020-09-25 09:14:04 +02:00 committed by GitHub
parent 050968cbac
commit 5e63ab619e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 7 deletions

View file

@ -496,7 +496,7 @@ Defines the polling interval (in seconds) in Swarm Mode.
### `httpClientTimeout`
_Optional, Default=32_
_Optional, Default=0_
```toml tab="File (TOML)"
[providers.docker]
@ -516,7 +516,7 @@ providers:
# ...
```
Client timeout for HTTP connections (in seconds).
Defines the client timeout (in seconds) for HTTP connections. If zero, no timeout is set.
### `watch`

View file

@ -406,7 +406,7 @@ Docker server endpoint. Can be a tcp or a unix socket endpoint. (Default: ```uni
Expose containers by default. (Default: ```true```)
`--providers.docker.httpclienttimeout`:
Client timeout for HTTP connections. (Default: ```32```)
Client timeout for HTTP connections. (Default: ```0```)
`--providers.docker.network`:
Default Docker network used.

View file

@ -406,7 +406,7 @@ Docker server endpoint. Can be a tcp or a unix socket endpoint. (Default: ```uni
Expose containers by default. (Default: ```true```)
`TRAEFIK_PROVIDERS_DOCKER_HTTPCLIENTTIMEOUT`:
Client timeout for HTTP connections. (Default: ```32```)
Client timeout for HTTP connections. (Default: ```0```)
`TRAEFIK_PROVIDERS_DOCKER_NETWORK`:
Default Docker network used.

View file

@ -213,8 +213,8 @@ func (c *Configuration) SetEffectiveConfiguration() {
c.Providers.Docker.SwarmModeRefreshSeconds = ptypes.Duration(15 * time.Second)
}
if c.Providers.Docker.HTTPClientTimeout <= 0 {
c.Providers.Docker.HTTPClientTimeout = ptypes.Duration(32 * time.Second)
if c.Providers.Docker.HTTPClientTimeout < 0 {
c.Providers.Docker.HTTPClientTimeout = 0
}
}

View file

@ -68,7 +68,6 @@ func (p *Provider) SetDefaults() {
p.Endpoint = "unix:///var/run/docker.sock"
p.SwarmMode = false
p.SwarmModeRefreshSeconds = ptypes.Duration(15 * time.Second)
p.HTTPClientTimeout = ptypes.Duration(32 * time.Second)
p.DefaultRule = DefaultTemplateRule
}