blob: 61175e827b6ef5fda080ded67422aa27fb73772e [file] [log] [blame]
Giorgi Lekveishvili4ec4c022024-08-17 15:09:24 +04001{{- if .Values.ingress.enabled }}
Giorgi Lekveishvili4ec4c022024-08-17 15:09:24 +04002apiVersion: networking.k8s.io/v1
Giorgi Lekveishvili4ec4c022024-08-17 15:09:24 +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:
Giorgi Lekveishvili193b7c02025-05-22 16:21:37 +040017 {{- if .Values.ingress.ingressClassName }}
Giorgi Lekveishvili4ec4c022024-08-17 15:09:24 +040018 ingressClassName: {{ .Values.ingress.ingressClassName }}
19 {{- end }}
20 rules:
21 - host: {{ .Values.ingress.host }}
22 http:
23 paths:
24 - path: {{ default "" .Values.ingress.path }}
Giorgi Lekveishvili193b7c02025-05-22 16:21:37 +040025 pathType: {{ default "ImplementationSpecific" .Values.ingress.pathType }}
Giorgi Lekveishvili4ec4c022024-08-17 15:09:24 +040026 backend:
Giorgi Lekveishvili4ec4c022024-08-17 15:09:24 +040027 service:
28 name: longhorn-frontend
29 port:
30 number: 80
Giorgi Lekveishvili4ec4c022024-08-17 15:09:24 +040031{{- if .Values.ingress.tls }}
32 tls:
33 - hosts:
34 - {{ .Values.ingress.host }}
35 secretName: {{ .Values.ingress.tlsSecret }}
36{{- end }}
37{{- end }}