---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: aachen-transparent
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-prod
    nginx.ingress.kubernetes.io/auth-type: basic
    nginx.ingress.kubernetes.io/auth-realm: "Beta Access"
    nginx.ingress.kubernetes.io/auth-secret: demo-auth
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
    nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
    nginx.ingress.kubernetes.io/use-regex: "true"
    nginx.ingress.kubernetes.io/rewrite-target: /$1

spec:
  rules:
  - host: aachen-transparent.de
    http:
      paths:
      - path: /static/(.*)
        pathType: ImplementationSpecific
        backend:
          service:
            name: nginx
            port:
              number: 80
      - path: /(.*)
        pathType: Prefix
        backend:
          service:
            name: backend
            port:
              number: 80
  tls:
  - hosts:
    - aachen-transparent.de
    secretName: letsencrypt-aachen-transparent
