apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: kubeflow-gateway 
  namespace: kubeflow
spec:
  selector:
    istio: ingressgateway
  servers:
  - port:
      number: 5556
      name: https-dex
      protocol: HTTPS
    hosts:
    - "*"
    tls:
      mode: SIMPLE
      serverCertificate: /etc/istio/ingressgateway-certs/tls.crt
      privateKey: /etc/istio/ingressgateway-certs/tls.key
  - port:
      number: 443
      name: https
      protocol: HTTPS
    hosts:
    - "*"
    tls:
      mode: SIMPLE
      serverCertificate: /etc/istio/ingressgateway-certs/tls.crt
      privateKey: /etc/istio/ingressgateway-certs/tls.key    

--- 

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: auth-virtual-services
  namespace: kubeflow
spec:
  hosts:
  - "*"
  gateways:
  - kubeflow-gateway
  http:
    - match:
        - port: 5556
      route:
        - destination:
            port:
              number: 5556
            host: dex.kubeflow.svc.cluster.local
