You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(kubernetes): validate runtime control mount paths - #4522
Fix Kubernetes PVC mount validation so caller mounts cannot overlap driver-managed runtime and control paths. Apply the checks to new sandbox requests and saved pod templates before restart and scheduling-gate release, including when resource admission is disabled.
Related Issue
No linked issue.
Changes
Reserve the /.openshell tree and driver-managed /run mount, checking normalized targets for overlap in either direction.
Revalidate caller PVC destinations in saved templates while preserving driver-managed workspace mounts.
Add regression coverage for all workspace modes, nested subPath mounts, trailing slashes, saved templates, and permitted data mounts.
Document the mount restrictions and troubleshooting guidance.
Testing
cargo test --locked -p openshell-driver-kubernetes --quiet — 293 tests passed.
cargo fmt -p openshell-driver-kubernetes -- --check and git diff --check.
Repository pre-commit checks, including workspace Rust lint, example-project lint, Markdown, Helm, license, formatting, and lockfile checks.
mise run docs — no errors; three existing warnings.
OPENSHELL_E2E_KUBE_TEST=sandbox_templates mise run e2e:kubernetes — eight conformance tests and four template tests passed with the matching CLI and local gateway, sandbox, and supervisor images.
Checklist
Follows Conventional Commits.
Commits are signed off for DCO.
Crate README, published documentation, and related troubleshooting skill updated.
Kubernetes PVC mounts overlapping /.openshell or /run are newly rejected, including persisted sandbox templates during restart or scheduling-gate release. This breaks Stable configuration and state behavior on a no-break train despite the added migration hint.
1. configuration — NOT ACKED
template.driver_config.kubernetes.containers.agent.volume_mounts[].mount_path previously rejected only service-account-path overlaps, but now also rejects overlaps with /.openshell and /run and revalidates persisted templates.
Impact: CLI and SDK callers using these previously accepted mounts receive INVALID_ARGUMENT, while existing sandboxes can fail restart or scheduling-gate release with FAILED_PRECONDITION.
Action: Retain the baseline mount behavior for this train, or defer the restriction to a break-permitted release with upgrade guidance for migrating or recreating affected persisted sandboxes.
Label test:e2e-kubernetes applied for 04ad857. Open the existing run and click Re-run all jobs to execute with the label set. The run will execute Kubernetes HA and credential-driver E2E after building the required gateway, sandbox, and supervisor images once. This is an optional proof-of-life suite; failures are visible in the workflow run but do not publish a required CI gate status.
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
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
Fix Kubernetes PVC mount validation so caller mounts cannot overlap driver-managed runtime and control paths. Apply the checks to new sandbox requests and saved pod templates before restart and scheduling-gate release, including when resource admission is disabled.
Related Issue
No linked issue.
Changes
/.openshelltree and driver-managed/runmount, checking normalized targets for overlap in either direction.subPathmounts, trailing slashes, saved templates, and permitted data mounts.Testing
cargo test --locked -p openshell-driver-kubernetes --quiet— 293 tests passed.cargo clippy --locked -p openshell-driver-kubernetes --all-targets -- -D warnings.cargo fmt -p openshell-driver-kubernetes -- --checkandgit diff --check.mise run docs— no errors; three existing warnings.OPENSHELL_E2E_KUBE_TEST=sandbox_templates mise run e2e:kubernetes— eight conformance tests and four template tests passed with the matching CLI and local gateway, sandbox, and supervisor images.Checklist