Skip to content

Commit

Permalink
[chore] Adds the JAVA_DBCONNECTOR service type (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjlgao authored Dec 5, 2023
1 parent 11ffe2a commit bed2332
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 40 deletions.
2 changes: 1 addition & 1 deletion charts/retool/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: retool
description: A Helm chart for Kubernetes
type: application
version: 6.0.7
version: 6.0.8
maintainers:
- name: Retool Engineering
email: [email protected]
Expand Down
86 changes: 48 additions & 38 deletions charts/retool/templates/deployment_backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
{{- with .Values.hostAliases }}
hostAliases:
{{ toYaml . | indent 8 }}
{{- end }}
{{- end }}
{{- if .Values.initContainers }}
initContainers:
{{- range $key, $value := .Values.initContainers }}
Expand All @@ -62,11 +62,21 @@ spec:
- name: NODE_ENV
value: production
{{- if include "retool.jobRunner.enabled" . }}
{{ if "$.Values.dbconnector.java.enabled" }}
- name: SERVICE_TYPE
value: MAIN_BACKEND,DB_CONNECTOR,DB_SSH_CONNECTOR,JAVA_DBCONNECTOR
{{ else }}
- name: SERVICE_TYPE
value: MAIN_BACKEND,DB_CONNECTOR,DB_SSH_CONNECTOR
{{ end }}
{{- else }}
{{ if "$.Values.dbconnector.java.enabled" }}
- name: SERVICE_TYPE
value: MAIN_BACKEND,DB_CONNECTOR,DB_SSH_CONNECTOR,JAVA_DBCONNECTOR,JOBS_RUNNER
{{ else }}
- name: SERVICE_TYPE
value: MAIN_BACKEND,DB_CONNECTOR,DB_SSH_CONNECTOR,JOBS_RUNNER
{{ end }}
{{- end }}
- name: CLIENT_ID
value: {{ default "" .Values.config.auth.google.clientId }}
Expand All @@ -82,43 +92,43 @@ spec:
value: {{ template "retool.postgresql.user" . }}
- name: POSTGRES_SSL_ENABLED
value: {{ template "retool.postgresql.ssl_enabled" . }}
{{- if .Values.config.dbConnectorTimeout }}
- name: DBCONNECTOR_QUERY_TIMEOUT_MS
value: {{ .Values.config.dbConnectorTimeout | quote }}
{{- if .Values.config.dbConnectorTimeout }}
- name: DBCONNECTOR_QUERY_TIMEOUT_MS
value: {{ .Values.config.dbConnectorTimeout | quote }}
{{- end }}
{{- if and (include "retool.workflows.enabled" .) (or (index .Values "retool-temporal-services-helm" "enabled") (.Values.workflows.temporal.enabled)) }}
- name: WORKFLOW_TEMPORAL_CLUSTER_FRONTEND_HOST
value: {{ template "retool.temporal.host" . }}
- name: WORKFLOW_TEMPORAL_CLUSTER_FRONTEND_PORT
value: {{ template "retool.temporal.port" . }}
- name: WORKFLOW_TEMPORAL_CLUSTER_NAMESPACE
value: {{ template "retool.temporal.namespace" . }}
{{- end }}
- name: WORKFLOW_TEMPORAL_CLUSTER_FRONTEND_HOST
value: {{ template "retool.temporal.host" . }}
- name: WORKFLOW_TEMPORAL_CLUSTER_FRONTEND_PORT
value: {{ template "retool.temporal.port" . }}
- name: WORKFLOW_TEMPORAL_CLUSTER_NAMESPACE
value: {{ template "retool.temporal.namespace" . }}
{{- end }}
{{- if include "retool.workflows.enabled" . }}
- name: WORKFLOW_BACKEND_HOST
value: http://{{ template "retool.fullname" . }}-workflow-backend
{{- end }}
{{- if (.Values.workflows.temporal).sslEnabled }}
- name: WORKFLOW_TEMPORAL_TLS_ENABLED
value: "true"
{{- if (and (.Values.workflows.temporal).sslCert (.Values.workflows.temporal).sslKey) }}
- name: WORKFLOW_TEMPORAL_TLS_CRT
value: {{ .Values.workflows.temporal.sslCert }}
- name: WORKFLOW_TEMPORAL_TLS_KEY
valueFrom:
secretKeyRef:
{{- if (.Values.workflows.temporal).sslKeySecretName }}
name: {{ .Values.workflows.temporal.sslKeySecretName }}
key: {{ .Values.workflows.temporal.sslKeySecretKey | default "temporal-tls-key" }}
{{- else }}
name: {{ template "retool.fullname" . }}
key: "temporal-tls-key"
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.codeExecutor.enabled }}
- name: CODE_EXECUTOR_INGRESS_DOMAIN
value: http://{{ template "retool.codeExecutor.name" . }}
- name: WORKFLOW_BACKEND_HOST
value: http://{{ template "retool.fullname" . }}-workflow-backend
{{- end }}
{{- if (.Values.workflows.temporal).sslEnabled }}
- name: WORKFLOW_TEMPORAL_TLS_ENABLED
value: "true"
{{- if (and (.Values.workflows.temporal).sslCert (.Values.workflows.temporal).sslKey) }}
- name: WORKFLOW_TEMPORAL_TLS_CRT
value: {{ .Values.workflows.temporal.sslCert }}
- name: WORKFLOW_TEMPORAL_TLS_KEY
valueFrom:
secretKeyRef:
{{- if (.Values.workflows.temporal).sslKeySecretName }}
name: {{ .Values.workflows.temporal.sslKeySecretName }}
key: {{ .Values.workflows.temporal.sslKeySecretKey | default "temporal-tls-key" }}
{{- else }}
name: {{ template "retool.fullname" . }}
key: "temporal-tls-key"
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.codeExecutor.enabled }}
- name: CODE_EXECUTOR_INGRESS_DOMAIN
value: http://{{ template "retool.codeExecutor.name" . }}
{{- end }}
{{- if and (not .Values.externalSecrets.enabled) (not .Values.externalSecrets.externalSecretsOperator.enabled) }}
- name: LICENSE_KEY
Expand Down Expand Up @@ -201,9 +211,9 @@ spec:
envFrom:
- secretRef:
name: {{ .Values.externalSecrets.name }}
{{- range .Values.externalSecrets.secrets }}
- secretRef:
name: {{ .name }}
{{- range .Values.externalSecrets.secrets }}
- secretRef:
name: {{ .name }}
{{- end }}
{{- end }}
{{- if .Values.externalSecrets.externalSecretsOperator.enabled }}
Expand Down
7 changes: 6 additions & 1 deletion charts/retool/templates/deployment_workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,13 @@ spec:
env:
- name: NODE_ENV
value: production
{{ if "$.Values.dbconnector.java.enabled" }}
- name: SERVICE_TYPE
value: DB_CONNECTOR,DB_SSH_CONNECTOR,WORKFLOW_BACKEND
value: WORKFLOW_BACKEND,DB_CONNECTOR,DB_SSH_CONNECTOR,JAVA_DBCONNECTOR
{{ else }}
- name: SERVICE_TYPE
value: WORKFLOW_BACKEND,DB_CONNECTOR,DB_SSH_CONNECTOR
{{ end }}
- name: DBCONNECTOR_POSTGRES_POOL_MAX_SIZE
value: "100"
- name: DBCONNECTOR_QUERY_TIMEOUT_MS
Expand Down
6 changes: 6 additions & 0 deletions charts/retool/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,12 @@ workflows:
cpu: 1000m
memory: 2048Mi

dbconnector:
java:
# Enable this to use Retool's experimental next-gen dbconnector to connect to resources.
# This feature is not ready for production use; please check with the Retool team before enablement.
enabled: false

codeExecutor:
# Enable this for Python support and running code more securely within a separate
# sandboxed environment
Expand Down
6 changes: 6 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,12 @@ workflows:
cpu: 1000m
memory: 2048Mi

dbconnector:
java:
# Enable this to use Retool's experimental next-gen dbconnector to connect to resources.
# This feature is not ready for production use; please check with the Retool team before enablement.
enabled: false

codeExecutor:
# Enable this for Python support and running code more securely within a separate
# sandboxed environment
Expand Down

0 comments on commit bed2332

Please sign in to comment.