feat(helm): expose sandbox_uid and sandbox_gid as chart values - #3021
Open
natedemoss wants to merge 1 commit into
Open
feat(helm): expose sandbox_uid and sandbox_gid as chart values#3021natedemoss wants to merge 1 commit into
natedemoss wants to merge 1 commit into
Conversation
The Kubernetes compute driver already accepts sandbox_uid and sandbox_gid
as first-class config, but the chart's gateway ConfigMap never rendered
them. On a Helm-installed gateway the only lever for pinning a sandbox UID
was the openshift.io/sa.scc.uid-range namespace annotation, which is
OpenShift-branded and lives on a resource the chart does not own.
Render both keys into [openshell.drivers.kubernetes] using the same
{{- if .Values.server.X }} idiom as the sibling optional fields. Both
values default to "" and render nothing, so existing installs are
byte-identical to before.
Both are emitted unquoted because the driver parses them as TOML integers;
a quoted scalar would be rejected at gateway startup rather than at render
time.
Closes NVIDIA#2697
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kcgm4MbvdCsDRPWbiZ4mDu
Signed-off-by: natedemoss <ndemoss28@gmail.com>
natedemoss
requested review from
a team,
derekwaynecarr,
mrunalp and
sjenning
as code owners
August 29, 2026 15:16
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.
Summary
The Kubernetes driver has accepted
sandbox_uid/sandbox_gidas first-class config for a while, but the chart's gateway ConfigMap never rendered them, so a Helm-installed gateway had no way to reach them. Today the only lever is theopenshift.io/sa.scc.uid-rangenamespace annotation, which is awkward on non-OpenShift clusters and lives on a resource the chart doesn't own. This addsserver.sandboxUid/server.sandboxGidand renders them into[openshell.drivers.kubernetes].Related Issue
Closes #2697
Changes
templates/gateway-config.yaml— rendersandbox_uid/sandbox_gidwhen set, using the same{{- if .Values.server.X }}idiom as the sibling optional fields immediately above (app_armor_profile,default_runtime_class_name,workspace_storage_class, etc.).values.yaml— both default to"", so nothing renders unless you opt in. Existing installs get a byte-identical ConfigMap.Option<u32>, so a quoted scalar would fail at gateway startup rather than at render time. That's what the trailing$in the test regexes is guarding.resolve_sandbox_gid()already falls back to the configured UID, so an emptysandbox_gidmust not leak into the config.sandbox-compute-drivers.mdxonly mentioned the SCC annotation, so I pointed it at the chart values too.gateway-config.mdxalready documents the underlying TOML keys, so I left that page alone.No Rust changed; the driver side already works.
Testing
mise run pre-commitpassesI ran the checks that this change can actually affect, on Windows:
helm:lint— defaults plus all 16ci/values-*.yamlvariants, 17/17 clean.helm:docs:check— README regenerated with helm-docs and in sync.helm:test— 112 tests / 10 suites pass.fern check— 0 errors (the 2 warnings are pre-existing: the unauthenticated redirect check and a theme contrast ratio).markdownlint-cli2— 0 issues across all 132 files.I did not run the full
mise run pre-commit, so I've left that box unchecked rather than claim it: the Rust half oflintdoesn't build on Windows (opensshis unix-only), and this PR touches no Rust, Python, or proto. I also can't run the Kubernetes e2e lane locally. Since both values default to""and render nothing, I verified withhelm templatethat a default install produces zerosandbox_uid/sandbox_gidlines, and that setting them yieldssandbox_uid = 1500/sandbox_gid = 1600as bare integers.As a sanity check that the new tests actually bite, I stashed just the template change and re-ran the suite — the two rendering assertions fail without it.
Checklist