---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: &app theme-park
  namespace: default
  labels:
    app.kubernetes.io/name: *app
    app.kubernetes.io/instance: *app
  annotations:
    external-dns.alpha.kubernetes.io/target: "ipv4.${SECRET_PUBLIC_DOMAIN}"
    external-dns/is-public: "true"
    cert-manager.io/cluster-issuer: "letsencrypt-production"
spec:
  ingressClassName: nginx
  rules:
    - host: &host "theme-park.${SECRET_PUBLIC_DOMAIN}"
      http:
        paths:
          - backend:
              service:
                name: *app
                port:
                  number: 8080
            path: /
            pathType: Prefix
  tls:
    - hosts:
        - *host
      secretName: theme-park-tls
