apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: default-http-backend-ingress
  namespace: networking
  annotations:
    external-dns.alpha.kubernetes.io/target: "ipv4.${SECRET_DOMAIN}"
    external-dns/is-public: "true"
    haproxy-ingress-proxy.pfsense.org/enabled: "true"
    haproxy-ingress-proxy.pfsense.org/frontend: "https-443"
    haproxy-ingress-proxy.pfsense.org/backend: "traefik-443"
    traefik.ingress.kubernetes.io/router.entrypoints: "web,websecure"
    #traefik.ingress.kubernetes.io/router.priority: "11"
    traefik.ingress.kubernetes.io/router.tls.domains.0.main: default.${SECRET_DOMAIN}
spec:
  ingressClassName: traefik
  tls:
    - hosts:
        - "default.${SECRET_DOMAIN}"
      secretName: "${SECRET_DOMAIN//./-}-tls"
  # defaultBackend:
  #   service:
  #     name: default-http-backend-service
  #     port:
  #       number: 80
  rules:
  - host: default.${SECRET_DOMAIN}
    http:
      paths:
      - pathType: Prefix
        path: "/"
        backend:
          service:
            name: default-http-backend-service
            port:
              number: 80
