I am trying to put in place a traffic mirroring using VirtualService from my-service
to my-service-mirror
.
I'd like to mirror ONLY traffic going through specific endpoints of my-service
(path prefix cars
that I defined in my Controller class : @RequestMapping("cars")
).
My VirutalService looks like this :
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: my-service-mirroring
namespace: my-namespace
spec:
hosts:
- my-service-svc.my-namespace.svc.cluster.local
http:
- mirror:
host: my-service-mirror-svc.my-namespace.svc.cluster.local
mirrorPercent: 10
route:
- destination:
host: my-service-svc.my-namespace.svc.cluster.local
Is there a way to do this with VirutalService (like update the destination host)?
Thanks.