From bc30ae26858656d30b7fc070a11b80ddc75bed9a Mon Sep 17 00:00:00 2001 From: Marcin Kubica Date: Tue, 2 Dec 2025 16:21:26 +0000 Subject: [PATCH 1/3] feat: make workflow db pool configurable --- charts/retool/templates/_workers.tpl | 9 ++++++++- charts/retool/templates/deployment_workflows.yaml | 12 +++++++++++- charts/retool/values.yaml | 6 ++++++ values.yaml | 6 ++++++ 4 files changed, 31 insertions(+), 2 deletions(-) diff --git a/charts/retool/templates/_workers.tpl b/charts/retool/templates/_workers.tpl index 41fa034..7c574a6 100644 --- a/charts/retool/templates/_workers.tpl +++ b/charts/retool/templates/_workers.tpl @@ -29,6 +29,13 @@ {{- $workerValues = $parentValues.evalWorker -}} {{- end -}} +{{- $workerPoolMaxSize := 100 -}} +{{- if and $workerValues $workerValues.config }} + {{- if $workerValues.config.postgresPoolMaxSize }} + {{- $workerPoolMaxSize = $workerValues.config.postgresPoolMaxSize }} + {{- end }} +{{- end -}} + {{- $healthcheckPort := ternary 3012 3005 (eq $workerType "agentEval") -}} {{- $serviceType := ternary "AGENT_EVAL_TEMPORAL_WORKER" "WORKFLOW_TEMPORAL_WORKER" (eq $workerType "agentEval") -}} {{- $taskqueue := ternary "agent-eval" (ternary "agent" "" (eq $workerType "agent")) (eq $workerType "agentEval") -}} @@ -119,7 +126,7 @@ spec: value: {{ $taskqueue }} {{- end }} - name: DBCONNECTOR_POSTGRES_POOL_MAX_SIZE - value: "100" + value: {{ $workerPoolMaxSize | quote }} {{- if $.Values.dbconnector.enabled }} - name: DB_CONNECTOR_HOST value: http://{{ template "retool.fullname" $ }}-dbconnector diff --git a/charts/retool/templates/deployment_workflows.yaml b/charts/retool/templates/deployment_workflows.yaml index 2bc4c5d..db02e0d 100644 --- a/charts/retool/templates/deployment_workflows.yaml +++ b/charts/retool/templates/deployment_workflows.yaml @@ -62,6 +62,16 @@ spec: {{- if .Values.commandline.args }} {{ toYaml .Values.commandline.args | indent 10 }} {{- end }} + {{- $workflowBackendPoolMaxSize := 100 -}} + {{- with .Values.workflows }} + {{- with .backend }} + {{- with .config }} + {{- if .postgresPoolMaxSize }} + {{- $workflowBackendPoolMaxSize = .postgresPoolMaxSize }} + {{- end }} + {{- end }} + {{- end }} + {{- end }} env: - name: DEPLOYMENT_TEMPLATE_TYPE value: {{ template "retool.deploymentTemplateType" . }} @@ -107,7 +117,7 @@ spec: value: "true" {{ end }} - name: DBCONNECTOR_POSTGRES_POOL_MAX_SIZE - value: "100" + value: {{ $workflowBackendPoolMaxSize | quote }} - name: DBCONNECTOR_QUERY_TIMEOUT_MS {{- if .Values.workflows.dbConnectorTimeout }} value: {{ .Values.workflows.dbConnectorTimeout | quote}} diff --git a/charts/retool/values.yaml b/charts/retool/values.yaml index 98ced8f..bfbcb17 100644 --- a/charts/retool/values.yaml +++ b/charts/retool/values.yaml @@ -379,12 +379,18 @@ workflows: # Scaling this number will increase the number of workflow workers, e.g. a replicaCount of 4 # will launch 9 pods -- 1 workflow backend, 4 workflow workers, and 4 for temporal cluster replicaCount: 1 + config: + # Override the connection pool size used by workflow workers when calling the dbconnector service + postgresPoolMaxSize: 100 backend: # A replicaCount of 1 will launch 6 pods -- 1 workflow backend, 1 workflow worker, and 4 pods that make up the executor temporal cluster # Scaling this number will increase the number of workflow backends, e.g. a replicaCount of 4 # will launch 9 pods -- 4 workflow backend, 1 workflow workers, and 4 for temporal cluster replicaCount: 1 + config: + # Override the connection pool size used by workflow backends when calling the dbconnector service + postgresPoolMaxSize: 100 # If necessary, specify the resources to provision the workflows-backend pod separately from the main backend pods. # resources: diff --git a/values.yaml b/values.yaml index 98ced8f..bfbcb17 100644 --- a/values.yaml +++ b/values.yaml @@ -379,12 +379,18 @@ workflows: # Scaling this number will increase the number of workflow workers, e.g. a replicaCount of 4 # will launch 9 pods -- 1 workflow backend, 4 workflow workers, and 4 for temporal cluster replicaCount: 1 + config: + # Override the connection pool size used by workflow workers when calling the dbconnector service + postgresPoolMaxSize: 100 backend: # A replicaCount of 1 will launch 6 pods -- 1 workflow backend, 1 workflow worker, and 4 pods that make up the executor temporal cluster # Scaling this number will increase the number of workflow backends, e.g. a replicaCount of 4 # will launch 9 pods -- 4 workflow backend, 1 workflow workers, and 4 for temporal cluster replicaCount: 1 + config: + # Override the connection pool size used by workflow backends when calling the dbconnector service + postgresPoolMaxSize: 100 # If necessary, specify the resources to provision the workflows-backend pod separately from the main backend pods. # resources: From ec97c0765f8348850506460094eaa329455a1109 Mon Sep 17 00:00:00 2001 From: Marcin Kubica Date: Fri, 5 Dec 2025 17:43:55 +0000 Subject: [PATCH 2/3] simplify --- charts/retool/templates/_workers.tpl | 6 +++--- charts/retool/templates/deployment_workflows.yaml | 6 ++---- charts/retool/values.yaml | 10 ++++------ values.yaml | 10 ++++------ 4 files changed, 13 insertions(+), 19 deletions(-) diff --git a/charts/retool/templates/_workers.tpl b/charts/retool/templates/_workers.tpl index 7c574a6..2202691 100644 --- a/charts/retool/templates/_workers.tpl +++ b/charts/retool/templates/_workers.tpl @@ -30,9 +30,9 @@ {{- end -}} {{- $workerPoolMaxSize := 100 -}} -{{- if and $workerValues $workerValues.config }} - {{- if $workerValues.config.postgresPoolMaxSize }} - {{- $workerPoolMaxSize = $workerValues.config.postgresPoolMaxSize }} +{{- if $workerValues }} + {{- if $workerValues.postgresPoolMaxSize }} + {{- $workerPoolMaxSize = $workerValues.postgresPoolMaxSize }} {{- end }} {{- end -}} diff --git a/charts/retool/templates/deployment_workflows.yaml b/charts/retool/templates/deployment_workflows.yaml index db02e0d..a03f741 100644 --- a/charts/retool/templates/deployment_workflows.yaml +++ b/charts/retool/templates/deployment_workflows.yaml @@ -65,10 +65,8 @@ spec: {{- $workflowBackendPoolMaxSize := 100 -}} {{- with .Values.workflows }} {{- with .backend }} - {{- with .config }} - {{- if .postgresPoolMaxSize }} - {{- $workflowBackendPoolMaxSize = .postgresPoolMaxSize }} - {{- end }} + {{- if .postgresPoolMaxSize }} + {{- $workflowBackendPoolMaxSize = .postgresPoolMaxSize }} {{- end }} {{- end }} {{- end }} diff --git a/charts/retool/values.yaml b/charts/retool/values.yaml index bfbcb17..91284ce 100644 --- a/charts/retool/values.yaml +++ b/charts/retool/values.yaml @@ -379,18 +379,16 @@ workflows: # Scaling this number will increase the number of workflow workers, e.g. a replicaCount of 4 # will launch 9 pods -- 1 workflow backend, 4 workflow workers, and 4 for temporal cluster replicaCount: 1 - config: - # Override the connection pool size used by workflow workers when calling the dbconnector service - postgresPoolMaxSize: 100 + # Override the connection pool size used by workflow workers when calling the dbconnector service + postgresPoolMaxSize: 100 backend: # A replicaCount of 1 will launch 6 pods -- 1 workflow backend, 1 workflow worker, and 4 pods that make up the executor temporal cluster # Scaling this number will increase the number of workflow backends, e.g. a replicaCount of 4 # will launch 9 pods -- 4 workflow backend, 1 workflow workers, and 4 for temporal cluster replicaCount: 1 - config: - # Override the connection pool size used by workflow backends when calling the dbconnector service - postgresPoolMaxSize: 100 + # Override the connection pool size used by workflow backends when calling the dbconnector service + postgresPoolMaxSize: 100 # If necessary, specify the resources to provision the workflows-backend pod separately from the main backend pods. # resources: diff --git a/values.yaml b/values.yaml index bfbcb17..91284ce 100644 --- a/values.yaml +++ b/values.yaml @@ -379,18 +379,16 @@ workflows: # Scaling this number will increase the number of workflow workers, e.g. a replicaCount of 4 # will launch 9 pods -- 1 workflow backend, 4 workflow workers, and 4 for temporal cluster replicaCount: 1 - config: - # Override the connection pool size used by workflow workers when calling the dbconnector service - postgresPoolMaxSize: 100 + # Override the connection pool size used by workflow workers when calling the dbconnector service + postgresPoolMaxSize: 100 backend: # A replicaCount of 1 will launch 6 pods -- 1 workflow backend, 1 workflow worker, and 4 pods that make up the executor temporal cluster # Scaling this number will increase the number of workflow backends, e.g. a replicaCount of 4 # will launch 9 pods -- 4 workflow backend, 1 workflow workers, and 4 for temporal cluster replicaCount: 1 - config: - # Override the connection pool size used by workflow backends when calling the dbconnector service - postgresPoolMaxSize: 100 + # Override the connection pool size used by workflow backends when calling the dbconnector service + postgresPoolMaxSize: 100 # If necessary, specify the resources to provision the workflows-backend pod separately from the main backend pods. # resources: From 5ace3ed46a00bb8eb878b271bb8fbc93e80b4526 Mon Sep 17 00:00:00 2001 From: Marcin Kubica Date: Mon, 8 Dec 2025 15:36:14 +0000 Subject: [PATCH 3/3] bump semver --- charts/retool/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/retool/Chart.yaml b/charts/retool/Chart.yaml index 587bb0d..abe6b28 100644 --- a/charts/retool/Chart.yaml +++ b/charts/retool/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: retool description: A Helm chart for Kubernetes type: application -version: 6.8.9 +version: 6.9.0 maintainers: - name: Retool Engineering email: engineering+helm@retool.com