ersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: direct-mongo-through-egress-gateway
spec:
  hosts:
  - $MONGODB_HOST
  gateways:
  - mesh
  - istio-egressgateway
  tls:
  - match:
- gateways:
  - mesh
  port: $MONGODB_PORT
  sni_hosts:
  - $MONGODB_HOST
route:
- destination:
    host: istio-egressgateway.istio-system.svc.cluster.local
    subset: mongo
    port:
      number: 443
  tcp:
  - match:
- gateways:
  - istio-egressgateway
  port: 443
route:
- destination:
    host: $MO