Repository navigation
feat(orchestrator): mount existing claims into a sandbox - #340
Merged
Merged
Conversation
A Sandbox's own volumes start empty, so an app installed by user-data is downloaded again on every pod, and sessions had no way to share content. spec.sandbox.volumes mounts PersistentVolumeClaims that already exist in the Orchestrator's namespace into the daemon's container, read-only where asked. The Sandbox never owns such a claim, so a suspension, the retention and deleting the Orchestrator leave it in place. An unscheduled pod, such as one whose claim is missing, now reports the scheduler's reason on the Orchestrator. Closes #339
edenreich
marked this pull request as ready for review
November 10, 2026 23:36
Contributor
|
🎉 This PR is included in version 0.36.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This was referenced Nov 10, 2026
Closed
Merged
edenreich
added a commit
to inference-gateway/cli
that referenced
this pull request
Nov 11, 2026
## Summary
A session's own `storage` starts empty and `user_data` runs again on
every boot, so a heavy app is installed again on each machine and
sessions have no way to share content. A Kubernetes workspace in
`daemon.yaml` now takes `volumes`, each an existing
PersistentVolumeClaim of its namespace.
```yaml
workspaces:
- name: ubuntu-desktop
kind: kubernetes
volumes:
- name: footage
claim: raw-footage
mount_path: /mnt/footage
read_only: true
```
`read_only` is for content an agent copies before it changes it, so the
original stays as it is.
Closes #1803
## Changes
- `WorkspaceVolume` (`name`, `claim`, `mount_path`, `read_only`) and
`volumes` on `WorkspaceEntry` in `config/daemon.go`.
- Loading `daemon.yaml` rejects a volume without a name or a claim, a
name used twice and a `mount_path` that is not absolute. Volumes on a
workspace that is not `kind: kubernetes` are refused.
- `orchestrator()` sends the list as `spec.sandbox.volumes`, which
inference-gateway/operator#340 adds.
- `requiredOperatorVersion` names `v0.36.0` when a workspace has
volumes, so an older operator fails with the upgrade message.
- `docs/daemon.md` and `docs/configuration-reference.md` document the
key.
## Notes for the reviewer
- **`v0.36.0` is assumed.** It is the next minor release after operator
0.35.0, where inference-gateway/operator#340 is expected to land. The
constant and the docs line change if it ships under another version.
- **Volumes are fixed when a session is created,** like `user_data`. The
CLI only patches a running session's operating mode, so a changed list
reaches the sessions teleported after it.
- **`examples/session-teleport/daemon.yaml` is not changed,** although
#1803 asks for it. The example is runnable, and a volume there needs a
claim manifest and an operator release that does not exist yet.
- A workspace on `compute` keeps its volumes with no extra code, since
compute sets the connection fields only.
- Not run against a cluster. Depends on inference-gateway/operator#340.
## Docs follow-up
inference-gateway/docs#1188
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
A Sandbox's own volumes start empty, so an app installed by
spec.userDatais downloaded again on every pod, and sessions have no way to share content.spec.sandbox.volumesmounts PersistentVolumeClaims that already exist in the Orchestrator's namespace into the daemon's container, read-only where asked.Closes #339
Changes
SandboxVolume(name,claimName,mountPath,readOnly) andspec.sandbox.volumeson the Orchestrator, at most 16 entries.sandboxPodTemplateadds each claim as a pod volume and a mount on the daemon's container.readOnlyis set on both the claim source and the mount. The claims are plain pod volumes, notvolumeClaimTemplates, so the Sandbox never owns them.mountPathor/, a path that is or lies under/workspace,/home/infer/.infer/projectsor/var/lib/cloud/seed/nocloud, two volumes sharing a path or a name, an emptyclaimNameand a name that is not a DNS label.sandboxStatereports the Sandbox'sPodScheduledcondition when it is false, so a claim that does not exist shows up asReady=Falsewith the scheduler's reason.fsGroupChangePolicy: OnRootMismatch, so a large shared volume is not walked on every boot. A pod without volumes keeps its template, so upgrading the operator does not cycle existing Sandboxes.manifests/.Where this differs from the issue
claim-<name>, so a name can never collide with a volume the operator owns (workspace,state,user-data,binding-tls,agents-config,mcps-config). The issue asked to reject colliding names.Not verified
test/e2e/orchestrator_sandbox_test.gois extended to mount a read-only claim, check that a write fails and that the claim survives the Sandbox's expiry. It compiles but was not run locally.spec.userData(hostUsers: false) or aruntimeClassName. That acceptance criterion of [FEATURE] Mount existing claims into an Orchestrator's sandbox #339 is still open.Docs follow-up
inference-gateway/docs#1186