js-executor: drop backend-shared env inheritance + resize resources#304
Merged
Conversation
The js-executor deployment looped over the backend-shared .Values.env and .Values.environmentSecrets (and .Values.environmentVariables) unfiltered, injecting db creds, auth/encryption secrets, license key, and other backend config into a pod that needs none of it. This pollutes the workload and widens the blast radius of any change to shared env. js-executor is a standalone nsjail JS sandbox that reads none of the backend-shared env vars. Replace the inheritance with per-workload overrides: jsExecutor.env / jsExecutor.environmentSecrets / jsExecutor.environmentVariables (all default empty), matching the self-contained pattern already used by the mcp and agent_sandbox workloads. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Bump js-executor CPU rather than shrinking memory. Set requests == limits at cpu: 6000m / memory: 6Gi (Guaranteed QoS). The memory request is kept equal to the limit because JSE reads its memory limit and rejects requests at 80% of it, so the request must reserve the full amount. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the r2-cleanup integration branch (merges into
r2-cleanup, which later merges intor2).Changes
1. Stop inheriting backend-shared env
The js-executor deployment looped over the backend-shared
.Values.env,.Values.environmentSecrets, and.Values.environmentVariablesunfiltered, injecting db creds, auth/encryption secrets, the license key, and other backend config into a sandbox pod that needs none of it. Replaced with per-workload overridesjsExecutor.env/jsExecutor.environmentSecrets/jsExecutor.environmentVariables(all default empty), matching the self-contained pattern already used by themcpandagent_sandboxworkloads.Verified against the
js_executorservice inretool_development: it reads zero backend-shared env vars (no Postgres/DB, JWT, encryption, license, or auth secrets) — only deployment/telemetry metadata and config that all have defaults.2. Resize resources
Bump CPU to
6000mand set memory to6Gi, withrequests == limits(Guaranteed QoS). Memory request is kept equal to the limit because JSE reads its memory limit and rejects requests at 80% of it.Audit note
The env bleed only affected js-executor —
agent_sandboxandmcpwere already self-contained and need no change. (mcp still inherits.Values.files/PVC/commandline.args, left as a separate follow-up.)Verification
helm templateconfirms backend.Values.env/.Values.environmentSecretsno longer render in the js-executor pod, resources show6000m/6Gireq=limit; both values.yaml copies stay in sync;helm lintpasses.🤖 Generated with Claude Code