Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.11.23
version: 6.11.24
maintainers:
- name: Retool Engineering
email: engineering+helm@retool.com
Expand Down
31 changes: 31 additions & 0 deletions charts/retool/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,36 @@ Set Temporal namespace
{{- end -}}
{{- end -}}

{{/*
Returns "1" when a Temporal cluster is enabled for this deployment -- either
via the bundled retool-temporal-services-helm subchart or an external Temporal
cluster configured under .Values.workflows.temporal / .Values.temporal.
Usage: (include "retool.temporal.enabled" .)
*/}}
{{- define "retool.temporal.enabled" -}}
{{- $temporalConfig := include "retool.temporalConfig" . | fromYaml -}}
{{- if or (index .Values "retool-temporal-services-helm" "enabled") ($temporalConfig).enabled -}}1{{- end -}}
{{- end -}}

{{/*
R² orchestration backend env var. R² sandbox workflows run on either Temporal
(the code default) or pg-boss (a Postgres-backed durable job queue). When no
Temporal cluster is enabled, fall back to pg-boss so self-hosted deployments
without Temporal can still run R² tasks. Requires Retool >= 4.47.0.
Usage: {{- include "retool.r2.orchestrationBackendEnv" . | nindent 10 }}
*/}}
{{- define "retool.r2.orchestrationBackendEnv" -}}
{{- if ne (include "retool.temporal.enabled" .) "1" -}}
{{- $valid_retool_version_regexp := "([0-9]+\\.[0-9]+(\\.[0-9]+)?(-[a-zA-Z0-9]+)?)" }}
{{- $semver_version_regexp := "[0-9]+\\.[0-9]+(\\.[0-9]+)?" }}
{{- $retool_version_supports_r2_postgres := ( and ( regexMatch $valid_retool_version_regexp .Values.image.tag ) ( semverCompare ">= 4.47.0-0" ( regexFind $semver_version_regexp .Values.image.tag ) ) ) }}
Comment thread
greptile-apps[bot] marked this conversation as resolved.
{{- if $retool_version_supports_r2_postgres -}}
- name: R2_ORCHESTRATION_BACKEND
value: "postgres"
{{- end -}}
{{- end -}}
{{- end -}}

{{/*
Set dbconnector service name
*/}}
Expand Down Expand Up @@ -927,6 +957,7 @@ Usage: {{- include "retool.agentSandbox.backendEnvVars" . | nindent 10 }}
{{- $defaultSecretName := .Values.rr.agentSandbox.externalSecret.name | default (include "retool.agentSandbox.name" .) -}}
- name: RR_AGENT_PUBSUB_BACKEND
value: "postgres"
{{ include "retool.r2.orchestrationBackendEnv" . }}
- name: AGENT_SANDBOX_CONTROLLER_INGRESS_DOMAIN
value: {{ .Values.rr.agentSandbox.controllerUrl | default (printf "http://%s:%s" (include "retool.agentSandbox.controller.name" .) (toString .Values.rr.agentSandbox.controller.port)) | quote }}
{{- include "retool.agentSandbox.proxyEnvVars" . }}
Expand Down
1 change: 1 addition & 0 deletions charts/retool/templates/deployment_jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ spec:
{{- if eq (include "retool.rr.componentEnabled" (dict "root" $ "component" "agentSandbox")) "1" }}
- name: RR_AGENT_PUBSUB_BACKEND
value: "postgres"
{{- include "retool.r2.orchestrationBackendEnv" . | nindent 10 }}
{{- end }}

{{- $temporalConfig := (include "retool.temporalConfig" . | fromYaml) }}
Expand Down
Loading