-
Notifications
You must be signed in to change notification settings - Fork 0
/
longhorn-ingress.yml
39 lines (37 loc) · 1.38 KB
/
longhorn-ingress.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# USER=username; PASSWORD=password; echo "${USER}:$(openssl passwd -stdin -apr1 <<< ${PASSWORD})" >> auth
# kubectl -n longhorn-system create secret generic basic-auth-longhorn --from-file=auth
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: longhorn-ingress
namespace: longhorn-system
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
# type of authentication
nginx.ingress.kubernetes.io/auth-type: basic
# prevent the controller from redirecting (308) to HTTPS
nginx.ingress.kubernetes.io/ssl-redirect: 'false'
# name of the secret that contains the user/password definitions
nginx.ingress.kubernetes.io/auth-secret: basic-auth-longhorn
# message to display with an appropriate context why the authentication is required
nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required '
# custom max body size for file uploading like backing image uploading
nginx.ingress.kubernetes.io/proxy-body-size: 10000m
# nginx.ingress.kubernetes.io/rewrite-target: /$2
# nginx.ingress.kubernetes.io/use-regex: "true"
spec:
rules:
- host: longhorn.cynexia.net
http:
paths:
- pathType: Prefix
path: /
backend:
service:
name: longhorn-frontend
port:
number: 80
tls:
- hosts:
- longhorn.cynexia.net
secretName: longhorn.cynexia.net-tls