# ESRE routing example, not a complete application or a completed AKS migration.
# Namespace esre-gateway-sample, Service ticket-api:8080, managed GatewayClass
# approuting-istio, and a valid TLS Secret tickets-tls must already exist.
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
  name: tickets-edge
  namespace: esre-gateway-sample
spec:
  gatewayClassName: approuting-istio
  listeners:
    - name: https
      hostname: tickets.practice.invalid
      port: 443
      protocol: HTTPS
      tls:
        mode: Terminate
        certificateRefs:
          - kind: Secret
            name: tickets-tls
      allowedRoutes:
        namespaces:
          from: Same
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: tickets-api
  namespace: esre-gateway-sample
spec:
  parentRefs:
    - name: tickets-edge
      sectionName: https
  hostnames:
    - tickets.practice.invalid
  rules:
    - matches:
        - path:
            type: PathPrefix
            value: /api
      backendRefs:
        - name: ticket-api
          port: 8080
