feat(sandbox-env): per-tenant pod resources for tenant warm pools - #5836
Open
pedrofrxncx wants to merge 1 commit into
Open
feat(sandbox-env): per-tenant pod resources for tenant warm pools#5836pedrofrxncx wants to merge 1 commit into
pedrofrxncx wants to merge 1 commit into
Conversation
A tenant whose repo needs more memory than the fleet default had no way to ask for it: resources are pod-spec fields, so they can be neither per-claim nor per-pool — they need their own SandboxTemplate. - the sandbox pod spec moves into a shared partial. `tenantPools[].resources` renders a second SandboxTemplate from that SAME partial (so the two cannot drift) and points the pool at it; pools without it keep sharing the chart-wide template, and that render is byte-identical to before. - the claim now names the template the pool's pods were built from, read back off the operator's own SandboxWarmPool each reconcile tick rather than configured a second time on the Studio side — a claim naming a different template than the pod simply never binds.
pedrofrxncx
force-pushed
the
feat/tenant-pool-resources
branch
from
August 7, 2026 00:22
cf20dd2 to
ce3aece
Compare
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.
Follow-up to #5830. A tenant whose repo needs more memory than the fleet default
had no way to ask for it:
resourcesis a pod-spec field, so it can be neitherper-claim nor per-pool — it needs its own
SandboxTemplate.Shape
(
sandbox-env.sandboxTemplateSpec). SettingtenantPools[].resourcesrenders a second
SandboxTemplate, named after the pool, from that samepartial — so a hand-copied 400-line duplicate can't drift the first time
someone edits one of them — and points the pool at it.
resourceskeep sharing the chart-wide template. Their renderis unchanged.
which Studio reads back off the operator's own
SandboxWarmPoolon eachreconcile tick. Deliberately not a second string in
STUDIO_SANDBOX_TENANT_POOLS: a claim naming a different template than thepod never binds, and we've already been bitten twice this week by two sides
having to agree on one literal.
Verification
The refactor is the risky part, so it was gated on a render diff. Rendering the
chart with prod-shaped values before and after, the only difference is the
helm.sh/chartlabel from the version bump:Nothing else moves — the shared SandboxTemplate is byte-identical, so existing
installs that set no
resourcessee no spec change and their pools don't roll.Also verified: with two pools, one overriding resources and one not, the
overriding pool renders its own template with the overridden limits and points
at it, while the plain pool still points at
studio-sandbox-<env>.Not in this PR
do-not-disrupt). Same lever — itis now one
$pool.reference away — but it wants its own values shape and acost conversation.
updateStrategy: OnReplenishpin, which is feat(sandbox-env): per-tenant pod resources for tenant warm pools #5836's branch; this PR staysoff those lines to avoid conflicting with it.
Summary by cubic
Enable per-tenant pod resources for tenant warm pools by rendering a dedicated
SandboxTemplatewhentenantPools[].resourcesis set. Pools without overrides keep using the shared template unchanged; claims now bind to the exact template the pool used.sandbox-env.sandboxTemplateSpec). SettingtenantPools[].resourcesrenders a per-poolSandboxTemplate(named after the pool) and points the pool at it; others remain on the shared template (byte-identical render).listWarmPoolPods()now returns{ templateRef, pods }, and the runner caches per-pool template refs (falls back to the shared template before first reconcile).0.13.0.values.yamldocumentstenantPools[].resources.Written for commit ce3aece. Summary will update on new commits.