I setup the BookInfo traffic shaping demo and I have it splitting traffic between my two versions v1 and potato.
My goal is to make 50% of the traffic sent to “v1” fail while letting 100% of traffic sent to “potato” to succeed.
My virtual service for traffic shaping looks like this:
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: reviews
spec:
hosts:
- reviews
http:
- route:
- destination:
host: reviews
subset: v1
weight: 50 - destination:
host: reviews
subset: potato
weight: 50
- destination:
Then, when I try to add fault injection, it looks like this:
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: reviews
spec:
hosts:
- reviews
http:
- route:
- destination:
host: reviews
subset: v1
weight: 50
fault:
abort:
httpStatus: 500
percent: 50 - destination:
host: reviews
subset: potato
weight: 50
- destination:
My problem is that when I apply this policy, 50% of all traffic sent to reviews is hitting the abort clause and then the other 50% of the traffic is being distributed evenly between “v1” and “potato”.
Is there a method I am missing or is it not possible to run the test I described above?