Skip to content

Commit 9a3c6ff

Browse files
authored
[fix] Add default multiplayer ingress rule (#205)
1 parent fb753bf commit 9a3c6ff

File tree

4 files changed

+45
-1
lines changed

4 files changed

+45
-1
lines changed

charts/retool/Chart.yaml

+1-1
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.3.5
5+
version: 6.3.6
66
maintainers:
77
- name: Retool Engineering
88

charts/retool/templates/ingress.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,20 @@ spec:
3030
- host: {{ .Values.ingress.hostName | quote }}
3131
http:
3232
paths:
33+
# The multiplayer paths must be added before the main path to avoid less specific paths being matched first.
34+
{{- if ( and ((.Values.multiplayer).enabled) (((.Values.multiplayer).ingress).enabled) ) }}
35+
{{- range .Values.multiplayer.ingress.paths }}
36+
- path: {{ .path }}
37+
{{- if (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.Version) }}
38+
pathType: {{ .pathType | default "ImplementationSpecific" }}
39+
{{- end }}
40+
backend:
41+
service:
42+
name: {{ template "retool.multiplayer.name" . }}
43+
port:
44+
number: {{ .port }}
45+
{{- end }}
46+
{{- end }}
3347
- path:
3448
{{- if and $pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.Version) }}
3549
pathType: {{ $pathType }}
@@ -51,6 +65,20 @@ spec:
5165
paths:
5266
{{- with .extraPaths }}
5367
{{ toYaml . | indent 10 }}
68+
{{- end }}
69+
# The multiplayer paths must be added before the main path to avoid less specific paths being matched first.
70+
{{- if ( and (($.Values.multiplayer).enabled) ((($.Values.multiplayer).ingress).enabled) ) }}
71+
{{- range (($.Values.multiplayer).ingress).paths }}
72+
- path: {{ .path }}
73+
{{- if (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.Version) }}
74+
pathType: {{ .pathType | default "ImplementationSpecific" }}
75+
{{- end }}
76+
backend:
77+
service:
78+
name: {{ template "retool.multiplayer.name" . }}
79+
port:
80+
number: {{ .port }}
81+
{{- end }}
5482
{{- end }}
5583
{{- range .paths }}
5684
- path: {{ .path }}

charts/retool/values.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,14 @@ multiplayer:
461461
# Labels for multiplayer pods
462462
labels: {}
463463

464+
# Paths to route to multiplayer pods; defaults to /api/multiplayer. Can specify both path and port.
465+
ingress:
466+
# This conditional is dependent on multiplayer.enabled.
467+
enabled: true
468+
paths:
469+
- path: /api/multiplayer
470+
port: 80
471+
464472
codeExecutor:
465473
# enabled by default from Chart version 6.0.15 and Retool image 3.20.15 onwards
466474
# explicitly set other fields as needed

values.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,14 @@ multiplayer:
461461
# Labels for multiplayer pods
462462
labels: {}
463463

464+
# Paths to route to multiplayer pods; defaults to /api/multiplayer. Can specify both path and port.
465+
ingress:
466+
# This conditional is dependent on multiplayer.enabled.
467+
enabled: true
468+
paths:
469+
- path: /api/multiplayer
470+
port: 80
471+
464472
codeExecutor:
465473
# enabled by default from Chart version 6.0.15 and Retool image 3.20.15 onwards
466474
# explicitly set other fields as needed

0 commit comments

Comments
 (0)