mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-13 15:51:00 +00:00
bbc8f141e3
Add disabled-by-default HTTPRoute support with configurable parent references, hostnames, paths, annotations and optional timeouts. Route to the existing TREK Service and keep Ingress support unchanged, including simultaneous use. Document configuration and extend the existing Helm Chart & Compose job with HTTPRoute render variants and strict validation using a pinned CRDs catalog. Approved on Discord: https://discord.com/channels/1488298068427411591/1553537637455761500 Validation: strict Helm lint, 37 manifests validated without errors or skipped resources, and both Compose configuration checks passed locally. Live Gateway WebSocket and streamed assistant response checks were not performed because no Kubernetes test cluster was configured.
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
{{- if .Values.httpRoute.enabled -}}
|
|
{{- if not .Values.httpRoute.parentRefs }}
|
|
{{- fail "httpRoute.parentRefs must include at least one parent" }}
|
|
{{- end }}
|
|
{{- if not .Values.httpRoute.paths }}
|
|
{{- fail "httpRoute.paths must include at least one path" }}
|
|
{{- end }}
|
|
apiVersion: gateway.networking.k8s.io/v1
|
|
kind: HTTPRoute
|
|
metadata:
|
|
name: {{ include "trek.fullname" . }}
|
|
labels:
|
|
app: {{ include "trek.name" . }}
|
|
{{- with .Values.httpRoute.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
parentRefs:
|
|
{{- toYaml .Values.httpRoute.parentRefs | nindent 4 }}
|
|
{{- with .Values.httpRoute.hostnames }}
|
|
hostnames:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
rules:
|
|
{{- range $path := .Values.httpRoute.paths }}
|
|
- matches:
|
|
- path:
|
|
type: PathPrefix
|
|
value: {{ $path | quote }}
|
|
backendRefs:
|
|
- name: {{ include "trek.fullname" $ }}
|
|
port: {{ $.Values.service.port }}
|
|
{{- with $.Values.httpRoute.timeouts }}
|
|
timeouts:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|