Target the canary header in the load test

This commit is contained in:
stefanprodan 2019-03-11 15:04:01 +02:00
parent 881387e522
commit c720fee3ab
2 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@ spec:
regex: "^(?!.*Chrome)(?=.*\bSafari\b).*$" regex: "^(?!.*Chrome)(?=.*\bSafari\b).*$"
- headers: - headers:
cookie: cookie:
regex: "^(.*?;)?(user=test)(;.*)?$" regex: "^(.*?;)?(type=insider)(;.*)?$"
metrics: metrics:
- name: istio_requests_total - name: istio_requests_total
# minimum req success rate (non 5xx responses) # minimum req success rate (non 5xx responses)
@ -58,4 +58,4 @@ spec:
url: http://flagger-loadtester.test/ url: http://flagger-loadtester.test/
timeout: 5s timeout: 5s
metadata: metadata:
cmd: "hey -z 1m -q 10 -c 2 http://podinfo.test:9898/" cmd: "hey -z 1m -q 10 -c 2 -H 'Cookie: type=insider' http://podinfo.test:9898/"

View File

@ -93,7 +93,7 @@ spec:
url: http://flagger-loadtester.test/ url: http://flagger-loadtester.test/
timeout: 5s timeout: 5s
metadata: metadata:
cmd: "hey -z 1m -q 10 -c 2 http://podinfo.test:9898/" cmd: "hey -z 1m -q 10 -c 2 -H 'Cookie: type=insider' http://podinfo.test:9898/"
``` ```
The above configuration will run an analysis for ten minutes targeting Safari users and those that have an insider cookie. The above configuration will run an analysis for ten minutes targeting Safari users and those that have an insider cookie.