Skip to content

Commit 0ef78ab

Browse files
authored
add apigateway support (#270)
1 parent f1a0ec0 commit 0ef78ab

File tree

4 files changed

+114
-1
lines changed

4 files changed

+114
-1
lines changed

charts/retool/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: retool
33
description: A Helm chart for Kubernetes
44
type: application
5-
version: 6.9.2
5+
version: 6.10.0
66
maintainers:
77
- name: Retool Engineering
88
email: engineering+helm@retool.com
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{{- if .Values.httpRoute.enabled }}
2+
{{- $fullName := include "retool.fullname" . -}}
3+
{{- $svcPort := .Values.service.externalPort -}}
4+
apiVersion: gateway.networking.k8s.io/v1
5+
kind: HTTPRoute
6+
metadata:
7+
name: {{ $fullName }}
8+
labels:
9+
{{- include "retool.labels" . | nindent 4 }}
10+
{{- with .Values.httpRoute.labels }}
11+
{{- toYaml . | nindent 4 }}
12+
{{- end }}
13+
{{- with .Values.httpRoute.annotations }}
14+
annotations:
15+
{{- toYaml . | nindent 4 }}
16+
{{- end }}
17+
spec:
18+
{{- with .Values.httpRoute.parentRefs }}
19+
parentRefs:
20+
{{- toYaml . | nindent 4 }}
21+
{{- end }}
22+
{{- with .Values.httpRoute.hostnames }}
23+
hostnames:
24+
{{- toYaml . | nindent 4 }}
25+
{{- end }}
26+
rules:
27+
{{- if ( and ((.Values.multiplayer).enabled) (((.Values.multiplayer).httpRoute).enabled) ) }}
28+
{{- range .Values.multiplayer.httpRoute.rules }}
29+
- matches:
30+
- path:
31+
type: {{ .pathType | default "PathPrefix" }}
32+
value: {{ .path }}
33+
backendRefs:
34+
- name: {{ template "retool.multiplayer.name" $ }}
35+
port: {{ .port }}
36+
{{- end }}
37+
{{- end }}
38+
{{- if .Values.httpRoute.rules }}
39+
{{- toYaml .Values.httpRoute.rules | nindent 4 }}
40+
{{- else }}
41+
- matches:
42+
- path:
43+
type: PathPrefix
44+
value: /
45+
backendRefs:
46+
- name: {{ $fullName }}
47+
port: {{ $svcPort }}
48+
{{- end }}
49+
{{- end }}

charts/retool/values.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,30 @@ ingress:
200200
# name: use-annotation
201201
# pathType: ImplementationSpecific
202202

203+
# Gateway API HTTPRoute resource (alternative to ingress)
204+
# Requires a Gateway API implementation (e.g., GKE Gateway Controller, Istio, Envoy Gateway, NGINX Gateway Fabric)
205+
httpRoute:
206+
enabled: false
207+
labels: {}
208+
annotations: {}
209+
# parentRefs defines which Gateway(s) this route attaches to
210+
# parentRefs:
211+
# - name: my-gateway
212+
# namespace: default
213+
# sectionName: https
214+
# hostnames:
215+
# - retool.example.com
216+
# rules allows full customization of HTTPRoute rules; when omitted, a default
217+
# catch-all rule routes all traffic to the retool backend service
218+
# rules:
219+
# - matches:
220+
# - path:
221+
# type: PathPrefix
222+
# value: /
223+
# backendRefs:
224+
# - name: my-service
225+
# port: 3000
226+
203227
postgresql:
204228
# We highly recommend you do NOT use this subchart as is to run Postgres in a container
205229
# for your production instance of Retool; it is a default. Please use a managed Postgres,
@@ -520,6 +544,14 @@ multiplayer:
520544
- path: /api/multiplayer
521545
port: 80
522546

547+
# HTTPRoute rules for multiplayer when using Gateway API instead of ingress
548+
httpRoute:
549+
# This conditional is dependent on multiplayer.enabled.
550+
enabled: true
551+
rules:
552+
- path: /api/multiplayer
553+
port: 80
554+
523555
service:
524556
externalPort: 80
525557
internalPort: 3001

values.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,30 @@ ingress:
200200
# name: use-annotation
201201
# pathType: ImplementationSpecific
202202

203+
# Gateway API HTTPRoute resource (alternative to ingress)
204+
# Requires a Gateway API implementation (e.g., GKE Gateway Controller, Istio, Envoy Gateway, NGINX Gateway Fabric)
205+
httpRoute:
206+
enabled: false
207+
labels: {}
208+
annotations: {}
209+
# parentRefs defines which Gateway(s) this route attaches to
210+
# parentRefs:
211+
# - name: my-gateway
212+
# namespace: default
213+
# sectionName: https
214+
# hostnames:
215+
# - retool.example.com
216+
# rules allows full customization of HTTPRoute rules; when omitted, a default
217+
# catch-all rule routes all traffic to the retool backend service
218+
# rules:
219+
# - matches:
220+
# - path:
221+
# type: PathPrefix
222+
# value: /
223+
# backendRefs:
224+
# - name: my-service
225+
# port: 3000
226+
203227
postgresql:
204228
# We highly recommend you do NOT use this subchart as is to run Postgres in a container
205229
# for your production instance of Retool; it is a default. Please use a managed Postgres,
@@ -520,6 +544,14 @@ multiplayer:
520544
- path: /api/multiplayer
521545
port: 80
522546

547+
# HTTPRoute rules for multiplayer when using Gateway API instead of ingress
548+
httpRoute:
549+
# This conditional is dependent on multiplayer.enabled.
550+
enabled: true
551+
rules:
552+
- path: /api/multiplayer
553+
port: 80
554+
523555
service:
524556
externalPort: 80
525557
internalPort: 3001

0 commit comments

Comments
 (0)