# Istio 1.22.x file-based Gateway pattern.
# Merge into the existing Gateway; preserve other listeners and identity restrictions.
# Substitute the existing resource name, ingress hostname and server identity file paths.
apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
  name: <EXISTING_GATEWAY_RESOURCE_NAME>
  namespace: istio-iut
spec:
  selector:
    istio: istio-ingressgateway
  servers:
    - port:
        number: 443
        name: https-mtls
        protocol: HTTPS
      hosts: ["<INGRESS_HOSTNAME>"]
      tls:
        mode: MUTUAL
        # Existing platform-managed identity, already readable by the gateway proxy.
        serverCertificate: <EXISTING_SERVER_CERTIFICATE_FILE>
        privateKey: <EXISTING_SERVER_PRIVATE_KEY_FILE>
        caCertificates: /etc/istio/client-trust/ca.crt
        # Do not combine this file-based configuration with credentialName.
