Scenario: SLO validation with progressive traffic shift
This tutorial illustrates an SLO validation experiment with two versions; the candidate version will be promoted after Iter8 validates that it satisfies service-level objectives (SLOs). You will:
Specify latency and error-rate based service-level objectives (SLOs). If the candidate version satisfies SLOs, Iter8 will declare it as the winner.
Use Prometheus as the provider for latency and error-rate metrics.
apiVersion:iter8.tools/v2alpha2kind:Experimentmetadata:name:slovalidation-expspec:# target identifies the service under experimentation using its fully qualified nametarget:bookinfo-iter8/productpagestrategy:# this experiment will perform a Canary testtestingPattern:Canary# this experiment will progressively shift traffic to the winning versiondeploymentPattern:Progressiveactions:# when the experiment completes, promote the winning version using kubectl applyfinish:-if:CandidateWon()run:kubectl -n bookinfo-iter8 apply -f https://raw.githubusercontent.com/iter8-tools/iter8/master/samples/istio/quickstart/vs-for-v2.yaml-if:not CandidateWon()run:kubectl -n bookinfo-iter8 apply -f https://raw.githubusercontent.com/iter8-tools/iter8/master/samples/istio/quickstart/vs-for-v1.yamlcriteria:objectives:# metrics used to validate versions-metric:iter8-istio/mean-latencyupperLimit:300-metric:iter8-istio/error-rateupperLimit:"0.01"requestCount:iter8-istio/request-countduration:# product of fields determines length of the experimentintervalSeconds:10iterationsPerLoop:5versionInfo:# information about the app versions used in this experimentbaseline:name:productpage-v1variables:-name:namespace# used in metric queriesvalue:bookinfo-iter8weightObjRef:apiVersion:networking.istio.io/v1beta1kind:VirtualServicenamespace:bookinfo-iter8name:bookinfofieldPath:.spec.http[0].route[0].weightcandidates:-name:productpage-v2variables:-name:namespace# used in metric queriesvalue:bookinfo-iter8weightObjRef:apiVersion:networking.istio.io/v1beta1kind:VirtualServicenamespace:bookinfo-iter8name:bookinfofieldPath:.spec.http[0].route[1].weight