---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: webhook-receiver
  annotations:
    traefik.ingress.kubernetes.io/router.entrypoints: "websecure"
    external-dns/is-public: "true"
    external-dns.alpha.kubernetes.io/target: "${SECRET_EXTERNAL_DNS_TARGET}"
spec:
  ingressClassName: "traefik"
  rules:
    - host: "github-flux-webhook.${SECRET_DOMAIN}"
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: webhook-receiver
                port:
                  number: 80
  tls:
    - hosts:
        - "github-flux-webhook.${SECRET_DOMAIN}"
      secretName: github-flux-webhook-${SECRET_DOMAIN/./-}-tls
