apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: helloworld-vs
  namespace: default
spec:
  hosts:
    - "*"
  gateways:
    - helloworld-gateway
  http:
    - match:
        - uri:
            exact: /helloworld
      route:
        - destination:
            host: helloworld.default.svc.cluster.local
            #            host: helloworld (OLD)
            port:
              number: 80
            subset: v1
          weight: 80
        - destination:
            #            host: helloworld (OLD)
            host: helloworld.default.svc.cluster.local
            port:
              number: 80
            subset: v2
          weight: 20
      rewrite:
        uri: "/"