From a76e2cdecab1090f097646645ee72a9deee2d6ad Mon Sep 17 00:00:00 2001 From: jatin Date: Tue, 17 Mar 2026 13:40:21 -0400 Subject: [PATCH] add apigateway support --- charts/retool/Chart.yaml | 2 +- charts/retool/templates/httproute.yaml | 49 ++++++++++++++++++++++++++ charts/retool/values.yaml | 32 +++++++++++++++++ values.yaml | 32 +++++++++++++++++ 4 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 charts/retool/templates/httproute.yaml diff --git a/charts/retool/Chart.yaml b/charts/retool/Chart.yaml index 9fb9577..da5a473 100644 --- a/charts/retool/Chart.yaml +++ b/charts/retool/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: retool description: A Helm chart for Kubernetes type: application -version: 6.9.2 +version: 6.10.0 maintainers: - name: Retool Engineering email: engineering+helm@retool.com diff --git a/charts/retool/templates/httproute.yaml b/charts/retool/templates/httproute.yaml new file mode 100644 index 0000000..e880892 --- /dev/null +++ b/charts/retool/templates/httproute.yaml @@ -0,0 +1,49 @@ +{{- if .Values.httpRoute.enabled }} +{{- $fullName := include "retool.fullname" . -}} +{{- $svcPort := .Values.service.externalPort -}} +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: {{ $fullName }} + labels: + {{- include "retool.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: + {{- if ( and ((.Values.multiplayer).enabled) (((.Values.multiplayer).httpRoute).enabled) ) }} + {{- range .Values.multiplayer.httpRoute.rules }} + - matches: + - path: + type: {{ .pathType | default "PathPrefix" }} + value: {{ .path }} + backendRefs: + - name: {{ template "retool.multiplayer.name" $ }} + port: {{ .port }} + {{- end }} + {{- end }} + {{- if .Values.httpRoute.rules }} + {{- toYaml .Values.httpRoute.rules | nindent 4 }} + {{- else }} + - matches: + - path: + type: PathPrefix + value: / + backendRefs: + - name: {{ $fullName }} + port: {{ $svcPort }} + {{- end }} +{{- end }} diff --git a/charts/retool/values.yaml b/charts/retool/values.yaml index b860a47..3705d39 100644 --- a/charts/retool/values.yaml +++ b/charts/retool/values.yaml @@ -200,6 +200,30 @@ ingress: # name: use-annotation # pathType: ImplementationSpecific +# Gateway API HTTPRoute resource (alternative to ingress) +# Requires a Gateway API implementation (e.g., GKE Gateway Controller, Istio, Envoy Gateway, NGINX Gateway Fabric) +httpRoute: + enabled: false + labels: {} + annotations: {} + # parentRefs defines which Gateway(s) this route attaches to + # parentRefs: + # - name: my-gateway + # namespace: default + # sectionName: https + # hostnames: + # - retool.example.com + # rules allows full customization of HTTPRoute rules; when omitted, a default + # catch-all rule routes all traffic to the retool backend service + # rules: + # - matches: + # - path: + # type: PathPrefix + # value: / + # backendRefs: + # - name: my-service + # port: 3000 + postgresql: # We highly recommend you do NOT use this subchart as is to run Postgres in a container # for your production instance of Retool; it is a default. Please use a managed Postgres, @@ -520,6 +544,14 @@ multiplayer: - path: /api/multiplayer port: 80 + # HTTPRoute rules for multiplayer when using Gateway API instead of ingress + httpRoute: + # This conditional is dependent on multiplayer.enabled. + enabled: true + rules: + - path: /api/multiplayer + port: 80 + service: externalPort: 80 internalPort: 3001 diff --git a/values.yaml b/values.yaml index b860a47..3705d39 100644 --- a/values.yaml +++ b/values.yaml @@ -200,6 +200,30 @@ ingress: # name: use-annotation # pathType: ImplementationSpecific +# Gateway API HTTPRoute resource (alternative to ingress) +# Requires a Gateway API implementation (e.g., GKE Gateway Controller, Istio, Envoy Gateway, NGINX Gateway Fabric) +httpRoute: + enabled: false + labels: {} + annotations: {} + # parentRefs defines which Gateway(s) this route attaches to + # parentRefs: + # - name: my-gateway + # namespace: default + # sectionName: https + # hostnames: + # - retool.example.com + # rules allows full customization of HTTPRoute rules; when omitted, a default + # catch-all rule routes all traffic to the retool backend service + # rules: + # - matches: + # - path: + # type: PathPrefix + # value: / + # backendRefs: + # - name: my-service + # port: 3000 + postgresql: # We highly recommend you do NOT use this subchart as is to run Postgres in a container # for your production instance of Retool; it is a default. Please use a managed Postgres, @@ -520,6 +544,14 @@ multiplayer: - path: /api/multiplayer port: 80 + # HTTPRoute rules for multiplayer when using Gateway API instead of ingress + httpRoute: + # This conditional is dependent on multiplayer.enabled. + enabled: true + rules: + - path: /api/multiplayer + port: 80 + service: externalPort: 80 internalPort: 3001