Repository navigation
Description
Summary
An Orchestrator with runtime: Sandbox cannot mount anything besides the two per-session volumes the operator creates (workspace and state, both from spec.sandbox.storage) and the user-data Secret. Every session therefore starts empty, and a heavy app installed through user_data is downloaded and installed again on every pod boot - DaVinci Resolve is about 1.8GB.
Add spec.sandbox.volumes, a list of existing PersistentVolumeClaims to mount into the daemon container:
spec:
runtime: Sandbox
sandbox:
storage: 5Gi
volumes:
- name: resolve
claimName: davinci-resolve
mountPath: /opt/resolve
- name: footage
claimName: raw-footage
mountPath: /mnt/footage
readOnly: trueTwo use cases drive it, and agent-sandbox's own storage guide (examples/latebind-storage-gke-sandbox) names both:
- Collaborative - an app or cache volume shared by sessions, so an install happens once.
- Exploration branching - a read-only base, such as raw footage, that the agent copies into its private workspace before editing. The original can never be changed, which is why
readOnlyis part of the definition.
Findings from agent-sandbox v1.0.10 (agents.x-k8s.io/v1beta1) that shape the design:
Sandbox.spec.podTemplate.specis a fullPodSpec, so nothing upstream blocks an extra volume or a read-only mount. This is an operator-only change insandboxPodTemplate(internal/controller/orchestrator_sandbox.go).volumeClaimTemplatesdo not fit. They are per-Sandbox, created empty, owned and garbage-collected with the Sandbox, and immutable after creation. A referenced claim must be a plain pod volume instead.- A changed pod template only reaches the next pod. The operator already hashes the template and cycles the Sandbox through Suspended, so a changed volume list should roll out the same way.
- The source is an existing claim only. A
hostPathsource is refused under the Kubernetes baseline pod security level, so it does not belong in this API. A client that wants a host folder creates a static PersistentVolume and claim itself. - The pod runs as the daemon's non-root user with an
fsGroup, and withspec.userDatait runs in its own user namespace (hostUsers: false). A mounted claim must work in both.
spec.pod.volumes from #316 is not enough on its own: it adds a volume for sidecar containers but no mount on the operator's container, and the Orchestrator has no spec.pod.
Out of scope, possible follow-ups: a writable per-session clone of a golden volume through dataSource on a claim template, image volumes, and SandboxTemplate / SandboxWarmPool. For app installs alone, a custom image with the app baked in is the alternative that needs no operator change - a node pulls it once and caches it.
Acceptance Criteria
-
spec.sandbox.volumesaccepts entries ofname,claimName,mountPathand optionalreadOnly(default false) - Each entry becomes a
persistentVolumeClaimvolume and a mount on the daemon container, next toworkspaceandstate -
readOnly: trueis set on both the claim source and the volume mount - A name that collides with
workspace,stateoruser-data, or a mount path that collides with or nests under theirs, is rejected with a clear message - A referenced claim is never owned by the Sandbox: suspension,
retention,shutdownTimeand deleting the Orchestrator leave it and its data in place - Changing the list on a running Orchestrator rolls out through the existing template-hash suspend and resume
- A claim that does not exist is reported on the Orchestrator's status instead of only a pod stuck Pending
- Mounts work with
spec.userDataset (hostUsers: false) and with aruntimeClassName, covered by a test - The docs state the access-mode rule: a ReadWriteOnce claim is shared within one node only, and sessions on several nodes need ReadWriteMany or ReadOnlyMany
- The CRD is regenerated and the sample and API reference are updated
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
chore(release): 🔖 0.36.0 [skip ci]
inference-gateway-releaser commentedon Nov 10, 2026
🎉 This issue has been resolved in version 0.36.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀