blob: a8a27028db42cd5566cc7b57ef3189db1d290021 [file] [log] [blame]
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +04001{{- if .Values.ingress.enabled }}
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +04002apiVersion: networking.k8s.io/v1
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +04003kind: Ingress
4metadata:
5 name: longhorn-ingress
6 namespace: {{ include "release_namespace" . }}
7 labels: {{- include "longhorn.labels" . | nindent 4 }}
8 app: longhorn-ingress
9 annotations:
10 {{- if .Values.ingress.secureBackends }}
11 ingress.kubernetes.io/secure-backends: "true"
12 {{- end }}
13 {{- range $key, $value := .Values.ingress.annotations }}
14 {{ $key }}: {{ $value | quote }}
15 {{- end }}
16spec:
gio16bb6382025-05-21 18:42:40 +040017 {{- if .Values.ingress.ingressClassName }}
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +040018 ingressClassName: {{ .Values.ingress.ingressClassName }}
19 {{- end }}
20 rules:
21 - host: {{ .Values.ingress.host }}
22 http:
23 paths:
24 - path: {{ default "" .Values.ingress.path }}
gioc9b92b12025-05-22 08:57:18 +040025 pathType: {{ default "ImplementationSpecific" .Values.ingress.pathType }}
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +040026 backend:
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +040027 service:
28 name: longhorn-frontend
29 port:
30 number: 80
gio3e1b96b2026-07-21 18:52:35 +040031{{- range .Values.ingress.extraHosts }}
32 - host: {{ . }}
33 http:
34 paths:
35 - path: {{ default "" $.Values.ingress.path }}
36 pathType: {{ default "ImplementationSpecific" $.Values.ingress.pathType }}
37 backend:
38 service:
39 name: longhorn-frontend
40 port:
41 number: 80
42{{- end }}
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +040043{{- if .Values.ingress.tls }}
44 tls:
45 - hosts:
46 - {{ .Values.ingress.host }}
gio3e1b96b2026-07-21 18:52:35 +040047 {{- range .Values.ingress.extraHosts }}
48 - {{ . }}
49 {{- end }}
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +040050 secretName: {{ .Values.ingress.tlsSecret }}
51{{- end }}
52{{- end }}