blob: 61175e827b6ef5fda080ded67422aa27fb73772e [file] [log] [blame]
gio2539d9e2025-05-22 12:19:30 +04001{{- if .Values.ingress.enabled }}
2apiVersion: networking.k8s.io/v1
3kind: 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:
17 {{- if .Values.ingress.ingressClassName }}
18 ingressClassName: {{ .Values.ingress.ingressClassName }}
19 {{- end }}
20 rules:
21 - host: {{ .Values.ingress.host }}
22 http:
23 paths:
24 - path: {{ default "" .Values.ingress.path }}
25 pathType: {{ default "ImplementationSpecific" .Values.ingress.pathType }}
26 backend:
27 service:
28 name: longhorn-frontend
29 port:
30 number: 80
31{{- if .Values.ingress.tls }}
32 tls:
33 - hosts:
34 - {{ .Values.ingress.host }}
35 secretName: {{ .Values.ingress.tlsSecret }}
36{{- end }}
37{{- end }}