Skip to content

Commit 3e1759d

Browse files
authored
[fix] Java dbconnector support when standalone dbconnector is enabled (#231)
1 parent 8746409 commit 3e1759d

7 files changed

+33
-7
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.4.6
5+
version: 6.4.7
66
maintainers:
77
- name: Retool Engineering
88

charts/retool/templates/deployment_backend.yaml

+8-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ spec:
8585
{{- if and ( not ( include "retool_version_with_java_dbconnector_opt_out" . ) ) ( $.Values.dbconnector.java.enabled ) }}
8686
{{- $serviceType = append $serviceType "JAVA_DBCONNECTOR" }}
8787
{{- end }}
88-
{{- /*
88+
{{- /*
8989
The dbconnector.enabled setting is to enable a standalone dbconnector deployment.
9090
If it is not enabled (default), the main backend acts as its own dbconnector.
9191
*/ -}}
@@ -123,7 +123,13 @@ spec:
123123
- name: DB_CONNECTOR_HOST
124124
value: http://{{ template "retool.fullname" . }}-dbconnector
125125
- name: DB_CONNECTOR_PORT
126-
value: {{ .Values.dbconnector.port | quote }}
126+
value: {{ $.Values.dbconnector.port | quote }}
127+
{{- if $.Values.dbconnector.java.enabled }}
128+
- name: JAVA_DBCONNECTOR_HOST
129+
value: http://{{ template "retool.fullname" . }}-dbconnector
130+
- name: JAVA_DBCONNECTOR_PORT
131+
value: {{ $.Values.dbconnector.java.port | quote }}
132+
{{- end }}
127133
{{- end }}
128134
{{- if .Values.config.dbConnectorTimeout }}
129135
- name: DBCONNECTOR_QUERY_TIMEOUT_MS

charts/retool/templates/deployment_dbconnector.yaml

+7-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ spec:
3131
{{- include "retool.labels" . | nindent 8 }}
3232
spec:
3333
{{- if .Values.dbconnector.terminationGracePeriodSeconds }}
34-
terminationGracePeriodSeconds: {{ .Values.dbconnector.terminationGracePeriodSeconds }}
34+
terminationGracePeriodSeconds: {{ .Values.dbconnector.terminationGracePeriodSeconds }}
3535
{{- end }}
3636
containers:
3737
- args:
@@ -267,4 +267,10 @@ spec:
267267
name: http-server
268268
port: {{ .Values.dbconnector.port }}
269269
targetPort: {{ .Values.dbconnector.port }}
270+
{{ if .Values.dbconnector.java.enabled }}
271+
- protocol: TCP
272+
name: java-dbconnector-server
273+
port: {{ .Values.dbconnector.java.port }}
274+
targetPort: {{ .Values.dbconnector.java.port }}
275+
{{ end }}
270276
{{- end }}

charts/retool/templates/deployment_workflows.yaml

+8-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ spec:
7474
{{- if and ( not ( include "retool_version_with_java_dbconnector_opt_out" . ) ) ( $.Values.dbconnector.java.enabled ) }}
7575
{{- $serviceType = append $serviceType "JAVA_DBCONNECTOR" }}
7676
{{- end }}
77-
{{- /*
77+
{{- /*
7878
The dbconnector.enabled setting is to enable a standalone dbconnector deployment.
7979
If it is not enabled (default), the main backend acts as its own dbconnector.
8080
*/ -}}
@@ -87,7 +87,13 @@ spec:
8787
- name: DB_CONNECTOR_HOST
8888
value: http://{{ template "retool.fullname" . }}-dbconnector
8989
- name: DB_CONNECTOR_PORT
90-
value: {{ .Values.dbconnector.port | quote }}
90+
value: {{ $.Values.dbconnector.port | quote }}
91+
{{- if $.Values.dbconnector.java.enabled }}
92+
- name: JAVA_DBCONNECTOR_HOST
93+
value: http://{{ template "retool.fullname" . }}-dbconnector
94+
- name: JAVA_DBCONNECTOR_PORT
95+
value: {{ $.Values.dbconnector.java.port | quote }}
96+
{{- end }}
9197
{{- end }}
9298
{{ if and ( include "retool_version_with_java_dbconnector_opt_out" . ) ( not $.Values.dbconnector.java.enabled ) }}
9399
- name: DISABLE_JAVA_DBCONNECTOR

charts/retool/templates/deployment_workflows_worker.yaml

+7-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,13 @@ spec:
8282
- name: DB_CONNECTOR_HOST
8383
value: http://{{ template "retool.fullname" . }}-dbconnector
8484
- name: DB_CONNECTOR_PORT
85-
value: {{ .Values.dbconnector.port | quote }}
85+
value: {{ $.Values.dbconnector.port | quote }}
86+
{{- if $.Values.dbconnector.java.enabled }}
87+
- name: JAVA_DBCONNECTOR_HOST
88+
value: http://{{ template "retool.fullname" . }}-dbconnector
89+
- name: JAVA_DBCONNECTOR_PORT
90+
value: {{ $.Values.dbconnector.java.port | quote }}
91+
{{- end }}
8692
{{ end }}
8793
- name: DBCONNECTOR_QUERY_TIMEOUT_MS
8894
{{- if .Values.workflows.dbConnectorTimeout }}

charts/retool/values.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ dbconnector:
454454
# Disable this to disable Retool's Java dbconnector. Applies whether
455455
# dbconnector.enabled is true or false.
456456
enabled: true
457+
port: 3007
457458

458459
# Desired pod count for dbconnector deployment.
459460
replicas: 1

values.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ dbconnector:
454454
# Disable this to disable Retool's Java dbconnector. Applies whether
455455
# dbconnector.enabled is true or false.
456456
enabled: true
457+
port: 3007
457458

458459
# Desired pod count for dbconnector deployment.
459460
replicas: 1

0 commit comments

Comments
 (0)