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