---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: jenkins
  namespace: jenkins
  annotations:
    cert-manager.io/cluster-issuer: "letsencrypt-production"
    hajimari.io/enable: "true"
    hajimari.io/icon: "code-tags-check"
    hajimari.io/group: "Applications"
    traefik.ingress.kubernetes.io/router.entrypoints: "websecure"
    external-dns.alpha.kubernetes.io/hostname: jenkins.parsec.sh
    external-dns.alpha.kubernetes.io/target: "ipv4.${SECRET_DOMAIN}"
    external-dns/is-public: "true"
  labels:
    name: jenkins
spec:
  ingressClassName: "traefik"

  tls:
    - hosts:
        - jenkins.${SECRET_DOMAIN}
      secretName: jenkins-tls

  rules:
    - host: "jenkins.${SECRET_DOMAIN}"
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: jenkins
                port:
                  number: 80
