---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: dex-k8s-authenticator
  namespace: security
  annotations:
    kubernetes.io/ingress-class: "nginx"
    kubernetes.io/tls-acme: "true"
    cert-manager.io/cluster-issuer: letsencrypt-production
    external-dns/is-public: "true"
    external-dns.alpha.kubernetes.io/target: "ipv4.${SECRET_DOMAIN}"
    haproxy-ingress-proxy.pfsense.org/enabled: "true"
    haproxy-ingress-proxy.pfsense.org/frontend: "https-443"
    haproxy-ingress-proxy.pfsense.org/backend: "nginx-443"
spec:
  ingressClassName: "nginx"
  tls:
    - hosts:
        - "kubeconf.${SECRET_DOMAIN}"
      secretName: dex-k8s-authenticator-cert
  rules:
    - host: "kubeconf.${SECRET_DOMAIN}"
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: dex-k8s-authenticator
                port:
                  number: 5555
