Skip to content
Open
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.12.1
version: 6.12.2
maintainers:
- name: Retool Engineering
email: engineering+helm@retool.com
Expand Down
3 changes: 3 additions & 0 deletions charts/retool/templates/deployment_agent_sandbox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"}}}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Fractional CPU limits round up

When a user sets rr.agentSandbox.sandbox.resources.limits.cpu to a fractional value, divisor: "1" rounds SANDBOX_CPU_LIMIT up to a whole core. For example, a 1.5-core limit is reported as 2. Build tools using that value may start too many threads for the sandbox's limit. Pass a value that preserves the fraction in a unit the consumer expects.

{{- end }}
{{- if .Values.telemetry.enabled }}
,{"name": "STATSD_HOST", "value": "{{ include "retool.telemetry.fullname" . }}.{{ .Release.Namespace }}"}
,{"name": "STATSD_PORT", "value": "9125"}
Expand Down
3 changes: 3 additions & 0 deletions charts/retool/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading