apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: docker-registry-internal
  namespace: docker-registry
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-production
    nginx.ingress.kubernetes.io/auth-realm: Authentication Required - ok
    nginx.ingress.kubernetes.io/auth-secret: basic-auth
    nginx.ingress.kubernetes.io/auth-type: basic
    nginx.ingress.kubernetes.io/proxy-body-size: "0"
    nginx.ingress.kubernetes.io/proxy-connect-timeout: "3600"
    nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
  labels:
    use-dns01-solver: "true"
spec:
  ingressClassName: nginx-internal
  rules:
  - host: registry.internal.crownlabs.polito.it
    http:
      paths:
      - backend:
          service:
            name: docker-registry
            port:
              name: registry
        path: /
        pathType: ImplementationSpecific
  tls:
  - hosts:
    - registry.internal.crownlabs.polito.it
    secretName: certificate-registry-internal
