From bc4e0d69a2fe984073e991c7688f68953ba22208 Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Sat, 14 Mar 2020 14:51:37 +0200 Subject: [PATCH] docs: Update A/B testing docs for Istio 1.5 - change the header match condition to a regex expression compatible with google re2 --- artifacts/examples/istio-abtest.yaml | 2 +- docs/gitbook/tutorials/istio-ab-testing.md | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/artifacts/examples/istio-abtest.yaml b/artifacts/examples/istio-abtest.yaml index f0492bc23..28cdde14a 100644 --- a/artifacts/examples/istio-abtest.yaml +++ b/artifacts/examples/istio-abtest.yaml @@ -43,7 +43,7 @@ spec: regex: "^(.*?;)?(type=insider)(;.*)?$" - headers: user-agent: - regex: "(?=.*Safari)(?!.*Chrome).*$" + regex: ".*Firefox.*" metrics: - name: request-success-rate thresholdRange: diff --git a/docs/gitbook/tutorials/istio-ab-testing.md b/docs/gitbook/tutorials/istio-ab-testing.md index 353c3b5b8..a416d7e35 100644 --- a/docs/gitbook/tutorials/istio-ab-testing.md +++ b/docs/gitbook/tutorials/istio-ab-testing.md @@ -65,7 +65,7 @@ Deploy the load testing service to generate traffic during the canary analysis: kubectl apply -k github.com/weaveworks/flagger//kustomize/tester ``` -Create a canary custom resource \(replace example.com with your own domain\): +Create a canary custom resource (replace example.com with your own domain): ```yaml apiVersion: flagger.app/v1beta1 @@ -112,7 +112,7 @@ spec: match: - headers: user-agent: - regex: "^(?!.*Chrome).*Safari.*" + regex: ".*Firefox.*" - headers: cookie: regex: "^(.*?;)?(type=insider)(;.*)?$" @@ -133,7 +133,7 @@ spec: webhooks: - name: load-test url: http://flagger-loadtester.test/ - timeout: 5s + timeout: 15s metadata: cmd: "hey -z 1m -q 10 -c 2 -H 'Cookie: type=insider' http://podinfo.test:9898/" ``` @@ -141,7 +141,7 @@ spec: **Note** that when using Istio 1.5 you have to replace the `request-duration` with a [metric template](https://docs.flagger.app/dev/upgrade-guide#istio-telemetry-v2). -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 Firefox users and those that have an insider cookie. Save the above resource as podinfo-abtest.yaml and then apply it: