apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: istio-egressgateway
  namespace: testns
spec:
  selector:
    # DO NOT CHANGE THESE LABELS
    # The egressgateway is defined in install/kubernetes/helm/istio/values.yaml
    # with these labels
    istio: egressgateway
  servers:
  - port:
      number: 80 #also declared in gateway's deployment files
      name: http
      protocol: HTTP
    hosts:
    - egressgateway.bookinfo.com
    #tls:
    #  httpsRedirect: true # sends 302 redirect for http requests
  - port:
      number: 443
      name: https
      protocol: HTTPS
    hosts:
    - egressgateway.bookinfo.com
    tls:
      # We can reuse the standard Istio certs mounted in the gateway
      mode: SIMPLE #enables HTTPS on this port
      serverCertificate: /etc/certs/cert-chain.pem
      privateKey: /etc/certs/key.pem
      caCertificates: /etc/certs/root-cert.pem
      #mode: MUTUAL # TODO
