---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: bitwarden
  namespace: vaultwarden
  labels:
    app: bitwarden
  annotations:
    # the name of the nginx-ingress-controller class
    # kubernetes.io/ingress.class: nginx-ingress-external
    # nginx.ingress.kubernetes.io/configuration-snippet: |
    #   more_set_headers "Request-Id: $req_id";
    # nginx.ingress.kubernetes.io/connection-proxy-header: "keep-alive"
    # nginx.ingress.kubernetes.io/enable-cors: "true"
    # nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
    # nginx.ingress.kubernetes.io/limit-connections: "25"
    # nginx.ingress.kubernetes.io/limit-rps: "15"
    # nginx.ingress.kubernetes.io/proxy-body-size: 1024m
    # nginx.ingress.kubernetes.io/proxy-connect-timeout: "10"
    # nginx.ingress.kubernetes.io/proxy-send-timeout: "1800"
    # nginx.ingress.kubernetes.io/proxy-read-timeout: "1800"
    # nginx.ingress.kubernetes.io/ssl-redirect: "true"
    cert-manager.io/cluster-issuer: letsencrypt-prod-dns
spec:
  rules:
    - host: pass.k8s.inpt.fr
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: bitwarden
                port:
                  name: http
          - path: /notifications/hub
            pathType: Prefix
            backend:
              service:
                name: bitwarden
                port:
                  name: websocket
  tls:
    - hosts:
        - pass.k8s.inpt.fr
      secretName: bitwarden-tls
