apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: model-registry
spec:
  gateways:
  - kubeflow-gateway
  hosts:
  - '*'
  http:
  - match:
    - uri:
        prefix: /api/model_registry/
    route:
    - destination:
        host: model-registry-service.kubeflow.svc.cluster.local
        port:
          number: 8080
  - match:
    - port: 9090
    - authority:
        regex: model-registry-service(\..+)?(:9090)?
    - uri:
        prefix: /ml_metadata.MetadataStoreService/
    route:
    - destination:
        host: model-registry-service.kubeflow.svc.cluster.local
        port:
          number: 9090
