| gio | 3e1b96b | 2026-07-21 18:52:35 +0400 | [diff] [blame] | 1 | {{- if .Values.httproute.enabled -}} |
| 2 | apiVersion: gateway.networking.k8s.io/v1 |
| 3 | kind: HTTPRoute |
| 4 | metadata: |
| 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 }} |
| 13 | spec: |
| 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 }} |