From 2b73bc5e383e5d59d29082c3323eb3914afd3ee4 Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Thu, 17 Oct 2019 09:12:39 +0300 Subject: [PATCH] Fix A/B testing examples --- artifacts/ab-testing/canary.yaml | 6 +++--- docs/gitbook/usage/nginx-progressive-delivery.md | 5 +---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/artifacts/ab-testing/canary.yaml b/artifacts/ab-testing/canary.yaml index eb96fd22..4bb89b57 100644 --- a/artifacts/ab-testing/canary.yaml +++ b/artifacts/ab-testing/canary.yaml @@ -36,12 +36,12 @@ spec: iterations: 10 # canary match condition match: - - headers: - user-agent: - regex: "^(?!.*Chrome)(?=.*\bSafari\b).*$" - headers: cookie: regex: "^(.*?;)?(type=insider)(;.*)?$" + - headers: + user-agent: + regex: "(?=.*Safari)(?!.*Chrome).*$" metrics: - name: request-success-rate # minimum req success rate (non 5xx responses) diff --git a/docs/gitbook/usage/nginx-progressive-delivery.md b/docs/gitbook/usage/nginx-progressive-delivery.md index 8426248c..2dcb117a 100644 --- a/docs/gitbook/usage/nginx-progressive-delivery.md +++ b/docs/gitbook/usage/nginx-progressive-delivery.md @@ -159,7 +159,6 @@ spec: url: http://flagger-loadtester.test/ timeout: 5s metadata: - type: cmd cmd: "hey -z 1m -q 10 -c 2 http://app.example.com/" ``` @@ -382,12 +381,10 @@ Edit the canary analysis, remove the max/step weight and add the match condition interval: 1m webhooks: - name: load-test - url: http://localhost:8888/ + url: http://flagger-loadtester.test/ timeout: 5s metadata: - type: cmd cmd: "hey -z 1m -q 10 -c 2 -H 'Cookie: canary=always' http://app.example.com/" - logCmdOutput: "true" ``` The above configuration will run an analysis for ten minutes targeting users that have a `canary` cookie set to `always` or