Skip to content

feat(compute): share folders of this computer with the local cluster - #533

Merged
edenreich merged 5 commits into
mainfrom
feat/cluster-folders
Nov 11, 2026
Merged

edenreich merged 5 commits into
mainfrom
feat/cluster-folders

Conversation

@edenreich

@edenreich edenreich commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A workspace's computers could only mount claims that already existed, so raw content on this computer had to be copied into the cluster by hand. The local cluster can now share folders of this computer with its workspaces, mounted straight from here with no copy, read-only for every workspace or for one.

Closes #531

How it reads in the app

  • Settings > Compute, Local cluster folders: a name, a path on this computer and Read-only per folder. A read-only folder cannot be changed from any workspace.
  • Settings > Workspaces, a volume on the local cluster: pick a folder by its path and type the mount path - /Users/you/Movies/raw -> /mnt/raw. Read-only there applies to that workspace alone. "An existing claim" stays available.

Changes

  • New backend/src/cluster_folders.rs - ClusterFolder (name, path, read_only), saved to ~/.infer/cluster_folders.yaml, with the Docker mounts and the PersistentVolume and claim manifest derived from it. Each folder gets a writable claim folder-<name> and a read-only claim folder-<name>-ro.
  • backend/src/local_cluster.rs - the node is created with the folders mounted. A cluster that runs with other folders is replaced only when asked, otherwise provisioning stops with a message.
  • provision_local_cluster takes recreate and applies the claims after the namespace exists. New commands cluster_folders, save_cluster_folders and cluster_folders_pending.
  • New frontend/components/ClusterFolders.tsx on the Compute tab, with the warning and the two-step Recreate local cluster when the saved folders differ from the ones the cluster runs with.
  • frontend/components/WorkspaceVolumes.tsx - on the local cluster a volume row maps a folder to a mount path, and a read-only volume is saved on the folder's read-only claim.
  • AGENTS.md DOM contract, README and a new e2e/tests/cluster-folders.yaml.

Why the layout looks like this

A pod that runs with User data sits in its own user namespace, and every volume of such a pod must support id-mapped mounts. Docker Desktop shares a folder of this computer through a filesystem that does not, so the folder cannot be the volume itself. The two spike comments on #531 have the details. What works:

/var/lib/rancher/k3s/folders/<name>/rw           <- hostPath of the claim, on the node's own disk
/var/lib/rancher/k3s/folders/<name>/rw/<name>    <- the folder of this computer
/var/lib/rancher/k3s/folders/<name>/ro/<name>    <- the same folder, mounted read-only

That is why a folder shows up one level below the mount path, as <mount path>/<name>, and why read-only is a mount on the node and not only the pod's own flag.

Notes for the reviewer

  • Folders are not in compute.yaml. The CLI rewrites that file from its own fields and would drop a key it does not know.
  • Run against the real local cluster, through the app's own functions: saving a folder, the refusal to recreate silently, recreating with the folder mounted and both claims bound. Pods in a user namespace, as root and as uid 1000, read and wrote through folder-<name> and could only read through folder-<name>-ro. A folder that is read-only for every workspace refused writes through both claims. The claim lookup the workspace check runs found an existing claim and reported a missing one.
  • Run through the real UI against the real local cluster, with the e2e runner's --no-mock: Save folders, the warning, cancelling with Keep the cluster, the two-step recreate, mapping the folder to a mount path on ubuntu-desktop read-only, the workspace check against the real claim, then removing it all again.
  • Not run: choosing the folder from the open dropdown with the mouse (the runner selected it by keyboard), and a mount inside a real session, which needs the unreleased operator and CLI.
  • Recreating deletes the cluster's machines. The app says so and asks twice.
  • It relies on runc id-mapping only the top mount of a volume, which is what runc 1.4.2 does and not a documented guarantee.
  • Nothing mounts in a session until the releases that carry feat(daemon): mount existing claims into a workspace's pods cli#1804 and feat(orchestrator): mount existing claims into a sandbox operator#340.

Docs follow-up

inference-gateway/docs#1192

A workspace's computers could only mount claims that already existed, so raw content on this computer had to be copied into the cluster by hand.

Settings > Compute now lists folders of this computer for the local cluster, each read-only or not. Its node mounts every folder below a directory of its own disk, the layout a pod in a user namespace can use, and provisioning creates a writable and a read-only claim for each. A workspace on the local cluster maps a folder to a mount path, read-only for that workspace when asked.

Docker mounts a folder only into a container it creates, so changed folders ask for the cluster to be recreated and never replace it silently.

Closes #531
…r dropdown

Driving the app against the real local cluster showed two flaws in the volume row. The claim and mount path fields were cut off to a few characters, and nothing moved focus on from the folder dropdown.

The row now sizes its fields and wraps, and Enter on the dropdown moves focus to the mount path once a folder is picked.

Refs #531
@edenreich
edenreich marked this pull request as ready for review November 11, 2026 10:45
@inference-gateway-maintainer

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.66.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@inference-gateway-maintainer inference-gateway-maintainer Bot added the released Shipped in a release label Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Volumes on a workspace in Settings

1 participant