blob: c80c469fbe82188d3a2f0ee8d06c6a29257294ec [file] [log] [blame]
gio3e1b96b2026-07-21 18:52:35 +04001{{- if .Values.httproute.enabled -}}
2apiVersion: gateway.networking.k8s.io/v1
3kind: HTTPRoute
4metadata:
5 name: longhorn-httproute
6 namespace: {{ include "release_namespace" . }}
7 labels: {{- include "longhorn.labels" . | nindent 4 }}
8 app: longhorn-httproute
9 {{- with .Values.httproute.annotations }}
10 annotations:
11 {{- toYaml . | nindent 4 }}
12 {{- end }}
13spec:
14 {{- with .Values.httproute.parentRefs }}
15 parentRefs:
16 {{- range . }}
17 - group: {{ .group | default "gateway.networking.k8s.io" }}
18 kind: {{ .kind | default "Gateway" }}
19 name: {{ .name }}
20 {{- with .namespace }}
21 namespace: {{ . }}
22 {{- end }}
23 {{- with .sectionName }}
24 sectionName: {{ . }}
25 {{- end }}
26 {{- end }}
27 {{- end }}
28 {{- with .Values.httproute.hostnames }}
29 hostnames:
30 {{- range . }}
31 - {{ . | quote }}
32 {{- end }}
33 {{- end }}
34 rules:
35 - matches:
36 - path:
37 type: {{ .Values.httproute.pathType | default "PathPrefix" }}
38 value: {{ .Values.httproute.path | default "/" }}
39 backendRefs:
40 - name: longhorn-frontend
41 port: 80
42{{- end }}