---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: webhook-receiver
  namespace: flux-system
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-production
    external-dns/is-public: "true"
    external-dns.alpha.kubernetes.io/target: "ipv4.${SECRET_DOMAIN}"
spec:
  ingressClassName: nginx
  rules:
    - host: &host "flux.${SECRET_DOMAIN}"
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: webhook-receiver
                port:
                  number: 80
  tls:
    - secretName: flux-tls
      hosts:
        - *host
