apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: gallery-be-internal
  namespace: gallery-be
spec:
  hosts:
    - gallery-be.gallery-be.svc.cluster.local
  http:
    - match:
        - headers:
            x-ada-destination:
              prefix: ADA_V1
      route:
        - destination:
            host: gallery-be
            subset: v1
            port:
              number: 80
    - match:
        - headers:
            x-ada-destination:
              prefix: ADA_V2
      route:
        - destination:
            host: gallery-be
            subset: v2
            port:
              number: 80
    - route:
        - destination:
            host: gallery-be
            subset: v1
            port:
              number: 80
        #   weight: 50
        # - destination:
        #     host: gallery-be
        #     subset: v2
        #     port:
        #       number: 80
        #   weight: 50
