blob: 61175e827b6ef5fda080ded67422aa27fb73772e [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
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +040031{{- if .Values.ingress.tls }}
32 tls:
33 - hosts:
34 - {{ .Values.ingress.host }}
35 secretName: {{ .Values.ingress.tlsSecret }}
36{{- end }}
37{{- end }}