2019-04-08 15:14:08 +00:00
|
|
|
# Retry
|
2019-02-26 13:50:07 +00:00
|
|
|
|
|
|
|
Retrying until it Succeeds
|
|
|
|
{: .subtitle }
|
|
|
|
|
2019-04-08 15:14:08 +00:00
|
|
|
`TODO: add schema`
|
2019-02-26 13:50:07 +00:00
|
|
|
|
2019-04-08 15:14:08 +00:00
|
|
|
Retry to send request on attempt failure.
|
2019-02-26 13:50:07 +00:00
|
|
|
|
2019-04-08 15:14:08 +00:00
|
|
|
## Configuration Examples
|
2019-02-26 13:50:07 +00:00
|
|
|
|
2019-04-08 15:14:08 +00:00
|
|
|
```yaml tab="Docker"
|
|
|
|
# Retry to send request 4 times
|
|
|
|
labels:
|
|
|
|
- "traefik.http.middlewares.test-retry.retry.attempts=4"
|
2019-02-26 13:50:07 +00:00
|
|
|
```
|
2019-04-08 15:14:08 +00:00
|
|
|
|
|
|
|
```yaml tab="Kubernetes"
|
|
|
|
# Retry to send request 4 times
|
|
|
|
apiVersion: traefik.containo.us/v1alpha1
|
|
|
|
kind: Middleware
|
|
|
|
metadata:
|
|
|
|
name: test-retry
|
|
|
|
spec:
|
|
|
|
retry:
|
|
|
|
attempts: 4
|
|
|
|
```
|
|
|
|
|
|
|
|
```yaml tab="Rancher"
|
|
|
|
# Retry to send request 4 times
|
|
|
|
labels:
|
|
|
|
- "traefik.http.middlewares.test-retry.retry.attempts=4"
|
|
|
|
```
|
|
|
|
|
|
|
|
```toml tab="File"
|
|
|
|
# Retry to send request 4 times
|
|
|
|
[http.middlewares]
|
|
|
|
[http.middlewares.test-retry.Retry]
|
|
|
|
attempts = 4
|
|
|
|
```
|
|
|
|
|
|
|
|
## Configuration Options
|
|
|
|
|
|
|
|
### `attempts`
|
|
|
|
|
|
|
|
_mandatory_
|
|
|
|
|
|
|
|
The `attempts` option defines how many times to try sending the request.
|