Hi hows it going everyone. Im having trouble understanding how multiple virtual service entries targeting a host are evaluated. We have a legacy api endpoint that is an aggregate of several services. When I route traffic to books.qa.svc.cluster.local
from the my-api
vs, the canary rules from the books-service
vs are never applied. I think I have a fundamental misunderstanding of how these rules are meant to work.
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: my-api
namespace: qa
spec:
gateways:
- public-gateway.qa.svc.cluster.local
- mesh
hosts:
- api.something.com
http:
- match:
- uri:
prefix: /books/
route:
- destination:
host: books.qa.svc.cluster.local
- match:
- uri:
prefix: /authors/
route:
- destination:
host: authors.qa.svc.cluster.local
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: books-service
namespace: qa
spec:
gateways:
- public-gateway.qa.svc.cluster.local
- mesh
hosts:
- books.qa.svc.cluster.local
http:
- route:
- destination:
host: books-primary.qa.svc.cluster.local
weight: 50
- destination:
host: books-canary.qa.svc.cluster.local
weight: 50
---