Add timeout and reties example to docs

This commit is contained in:
stefanprodan 2019-03-02 10:26:34 +02:00
parent bd35a3f61c
commit a23e4f1d2a
3 changed files with 25 additions and 6 deletions

View File

@ -8,8 +8,8 @@ Adds support for custom metric checks, HTTP timeouts and HTTP retries
#### Features
- Allow custom promql queries in the canary analysis spec [##60](https://github.com/stefanprodan/flagger/pull/#60)
- Add HTTP timeout and retries to canary service spec [##62](https://github.com/stefanprodan/flagger/pull/#62)
- Allow custom promql queries in the canary analysis spec [#60](https://github.com/stefanprodan/flagger/pull/60)
- Add HTTP timeout and retries to canary service spec [#62](https://github.com/stefanprodan/flagger/pull/62)
## 0.6.0 (2019-02-25)

View File

@ -8,13 +8,17 @@ spec:
- public-gateway.istio-system.svc.cluster.local
- mesh
hosts:
- podinfo.iowa.weavedx.com
- app.istio.weavedx.com
- podinfo
http:
- match:
- headers:
user-agent:
regex: ^(?!.*Chrome)(?=.*\bSafari\b).*$
uri:
prefix: "/version/"
rewrite:
uri: /api/info
route:
- destination:
host: podinfo-primary
@ -26,7 +30,12 @@ spec:
port:
number: 9898
weight: 100
- route:
- match:
- uri:
prefix: "/version/"
rewrite:
uri: /api/info
route:
- destination:
host: podinfo-primary
port:

View File

@ -131,13 +131,19 @@ metadata:
# Istio virtual service host names (optional)
hosts:
- frontend.example.com
# Istio virtual service HTTP match conditions (optional)
# HTTP match conditions (optional)
match:
- uri:
prefix: /
# Istio virtual service HTTP rewrite (optional)
# HTTP rewrite (optional)
rewrite:
uri: /
# timeout for HTTP requests (optional)
timeout: 5s
# retry policy when a HTTP request fails (optional)
retries:
attempts: 3
perTryTimeout: 3s
```
For the above spec Flagger will generate the following virtual service:
@ -168,6 +174,10 @@ spec:
prefix: /
rewrite:
uri: /
timeout: 5s
retries:
attempts: 3
perTryTimeout: 3s
route:
- destination:
host: frontend-primary