diff --git a/charts/retool/Chart.yaml b/charts/retool/Chart.yaml index 730e55ce..6137c4c6 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.12.1 +version: 6.12.2 maintainers: - name: Retool Engineering email: engineering+helm@retool.com diff --git a/charts/retool/templates/deployment_agent_sandbox.yaml b/charts/retool/templates/deployment_agent_sandbox.yaml index 7f589027..7732abbb 100644 --- a/charts/retool/templates/deployment_agent_sandbox.yaml +++ b/charts/retool/templates/deployment_agent_sandbox.yaml @@ -201,6 +201,9 @@ data: ,{"name": "SANDBOX_IDLE_TIMEOUT_MS", "value": "{{ $as.sandbox.sandboxIdleTimeoutMs }}"} ,{"name": "SANDBOX_GLOBAL_LIFETIME_MS", "value": "{{ $as.sandbox.sandboxGlobalLifetimeMs }}"} ,{"name": "SANDBOX_READY_TIMEOUT_MS", "value": "{{ $as.sandbox.sandboxReadyTimeoutMs }}"} + {{- if $as.sandbox.cpuAwareThreads }} + ,{"name": "SANDBOX_CPU_LIMIT", "valueFrom": {"resourceFieldRef": {"resource": "limits.cpu", "divisor": "1"}}} + {{- end }} {{- if .Values.telemetry.enabled }} ,{"name": "STATSD_HOST", "value": "{{ include "retool.telemetry.fullname" . }}.{{ .Release.Namespace }}"} ,{"name": "STATSD_PORT", "value": "9125"} diff --git a/charts/retool/values.yaml b/charts/retool/values.yaml index 99f6a55a..e44d907e 100644 --- a/charts/retool/values.yaml +++ b/charts/retool/values.yaml @@ -1218,6 +1218,9 @@ rr: limits: cpu: '2' memory: 4Gi + # Pass the sandbox container's CPU limit to build tools (tsc, esbuild, Rolldown, pnpm) + # so they size their thread pools to it. Without a CPU limit this is the node's CPU count. + cpuAwareThreads: true # Idle timeout (ms) before an unassigned sandbox self-terminates. sandboxIdleTimeoutMs: 600000 # Hard ceiling (ms) on total sandbox lifetime, regardless of activity. When diff --git a/values.yaml b/values.yaml index 99f6a55a..e44d907e 100644 --- a/values.yaml +++ b/values.yaml @@ -1218,6 +1218,9 @@ rr: limits: cpu: '2' memory: 4Gi + # Pass the sandbox container's CPU limit to build tools (tsc, esbuild, Rolldown, pnpm) + # so they size their thread pools to it. Without a CPU limit this is the node's CPU count. + cpuAwareThreads: true # Idle timeout (ms) before an unassigned sandbox self-terminates. sandboxIdleTimeoutMs: 600000 # Hard ceiling (ms) on total sandbox lifetime, regardless of activity. When