From 8158b9f42f6c5ec6a4359f9104651243660a3163 Mon Sep 17 00:00:00 2001 From: hoangphuocbk Date: Thu, 12 Mar 2026 00:55:36 +0700 Subject: [PATCH] feat: Add HTTPRoute support for Gateway API --- charts/quickwit/templates/httproute.yaml | 59 ++++++++++++++++++++++++ charts/quickwit/values.yaml | 51 ++++++++++++++++++++ 2 files changed, 110 insertions(+) create mode 100644 charts/quickwit/templates/httproute.yaml diff --git a/charts/quickwit/templates/httproute.yaml b/charts/quickwit/templates/httproute.yaml new file mode 100644 index 0000000..2f71076 --- /dev/null +++ b/charts/quickwit/templates/httproute.yaml @@ -0,0 +1,59 @@ +{{- if .Values.httproute.enabled -}} +{{- $fullname := include "quickwit.fullname" . }} +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: {{ $fullname }} + {{- if .Release.Namespace }} + namespace: {{ .Release.Namespace }} + {{- end }} + labels: + {{- include "quickwit.labels" . | nindent 4 }} + {{- with .Values.httproute.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.httproute.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.httproute.parentRefs }} + parentRefs: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.httproute.hostnames }} + hostnames: + {{- toYaml . | nindent 4 }} + {{- end }} + rules: + {{- range .Values.httproute.rules }} + - matches: + {{- with .matches }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .filters }} + filters: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .timeouts }} + timeouts: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- if .backendRefs }} + backendRefs: + {{- range .backendRefs }} + - group: {{ .group | default "" | quote }} + kind: {{ .kind | default "Service" | quote }} + {{- if eq (.kind | default "Service") "Service" }} + name: {{ $fullname }}-{{ .name | default "searcher" }} + {{- else }} + name: {{ .name }} + {{- end }} + port: {{ .port }} + {{- if .weight }} + weight: {{ .weight }} + {{- end }} + {{- end }} + {{- end }} + {{- end }} +{{- end }} diff --git a/charts/quickwit/values.yaml b/charts/quickwit/values.yaml index 8c5c88c..42d344d 100644 --- a/charts/quickwit/values.yaml +++ b/charts/quickwit/values.yaml @@ -713,3 +713,54 @@ ingress: # - secretName: chart-example-tls # hosts: # - chart-example.local + +# HTTPRoute configuration for Gateway API (alternative to Ingress). Only enable this if you have Gateway API CRDs installed and a Gateway controller. +httproute: + enabled: false + # annotations: {} + # labels: {} + parentRefs: [] + # - name: gateway-name + # namespace: gateway-namespace + # sectionName: http + hostnames: + - "*" + rules: + # Ingest and ES bulk endpoints to quickwit-indexer + - matches: + - path: + type: RegularExpression + value: /api/v1/.*/ingest + backendRefs: + - name: indexer + port: 7280 + - matches: + - path: + type: PathPrefix + value: /api/v1/_elastic/bulk + backendRefs: + - name: indexer + port: 7280 + - matches: + - path: + type: RegularExpression + value: /api/v1/_elastic/.*/_bulk + backendRefs: + - name: indexer + port: 7280 + # Indexes API endpoints to quickwit-metastore + - matches: + - path: + type: PathPrefix + value: /api/v1/indexes + backendRefs: + - name: metastore + port: 7280 + # Everything else to quickwit-searcher + - matches: + - path: + type: PathPrefix + value: / + backendRefs: + - name: searcher + port: 7280