Skip to content

feat(settings): configure clusters once in a Compute tab - #478

Merged
edenreich merged 1 commit into
mainfrom
feat/compute-tab
Nov 8, 2026
Merged

edenreich merged 1 commit into
mainfrom
feat/compute-tab

Conversation

@edenreich

@edenreich edenreich commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Resolves #474

Summary

A Kubernetes workspace carried its cluster's context, namespace and provider keys, once per workspace, and the Workspaces tab mixed cluster setup with the computers themselves. Settings gains a Compute tab where clusters are configured once, in ~/.infer/compute.yaml, the CLI's compute context (inference-gateway/cli#1761). A workspace then picks its cluster.

Merge after a CLI release that has compute. The CLI side is inference-gateway/cli#1762, which is merged, and inference-gateway/cli#1763, which is open. Until then every cluster action first checks that the installed infer has the compute commands. On an older CLI the Compute tab says to install updates and never writes compute.yaml or a compute key, which that CLI would refuse at startup.

Changes

  • Compute tab (frontend/components/ComputeTab.tsx, backend/src/compute_settings.rs)
    • Lists, adds, edits and deletes the clusters of compute.yaml. Machines, GPU settings and every key the tab does not know stay as they are.
    • Each cluster is checked once for what sessions need, and shows how many sessions every workspace on it runs, by the inference-gateway.com/compute label.
    • Detect clusters and Provision local cluster move here and create clusters. Provisioning registers the infer-k3s cluster and the ubuntu-desktop workspace on it.
    • Renaming a cluster moves the workspaces on it along. A cluster a workspace runs on cannot be deleted.
    • A cluster name must be a Kubernetes label value, because it labels the Gateway and the sessions.
  • Workspaces tab (frontend/components/WorkspacesTab.tsx, backend/src/workspace_settings.rs)
    • The form picks a Cluster. A workspace on one reads the cluster's kind, context, namespace and provider keys, so the prerequisites check, the running badge and machine clean-up reach it. Saving drops those keys from the workspace, since the CLI refuses to see them repeated.
    • A new workspace starts on the first cluster, with the installed CLI's image.
    • A workspace's running badge counts only its own sessions, by the inference-gateway.com/workspace label. It used to count the whole namespace.
    • Workspaces that carry their own connection keep working and stay editable as "Its own connection".
  • frontend/components/ClusterParts.tsx holds what both tabs share: the prerequisite list, the running badge, the restart notice and a check hook.
  • AGENTS.md: the DOM contract gains New cluster, Save cluster, Check cluster <name>, Edit cluster <name>, Delete cluster <name>, the cluster form ids and workspace-compute, and says where Detect clusters and Provision local cluster live now.

Verification

  • Backend: cargo test passes 245 tests. The new ones cover compute.yaml reads and edits keeping unknown keys and ${VAR} references, label-safe names, renames moving workspaces, cluster detection, a workspace on a cluster reading its connection and saving without the cluster's keys, and the local cluster with its workspace.
  • Frontend: bun test passes 224 tests, including the cluster form and a workspace on a cluster.
  • bun run build, cargo fmt --check and cargo clippy --all-targets -- -D warnings pass, and so does the pre-commit hook.
  • e2e: tests/compute-settings.yaml adds a cluster, and tests/workspace-provision.yaml now provisions from the Compute tab. cargo test -p desktop-e2e validates them. Not run on macOS yet, because the suite drives the real UI.

Not done here

A Kubernetes workspace carried its cluster's context, namespace and provider keys, once per workspace, and the Workspaces tab mixed cluster setup with computers. Settings gains a Compute tab that edits the clusters of ~/.infer/compute.yaml, the CLI's compute context. Each cluster is checked once for what sessions need and shows the sessions every workspace on it runs. Detect clusters and Provision local cluster move there and create clusters, the local one with its ubuntu-desktop workspace on it.

A workspace picks its cluster with `compute`. It reads the cluster's context, namespace and provider keys, and saving drops those keys from it, which the CLI refuses to see repeated. Renaming a cluster moves its workspaces along, and a cluster a workspace runs on cannot be deleted. Workspaces that carry their own connection keep working and stay editable as "Its own connection". A workspace's running badge now counts only its own sessions.

Every cluster action first checks that the installed infer has the compute commands, so the desktop never writes compute.yaml or a compute key an older CLI cannot read. On one, the Compute tab says to install updates.

Refs #474
@edenreich
edenreich marked this pull request as ready for review November 8, 2026 17:07
@edenreich
edenreich merged commit 73be323 into main Nov 8, 2026
1 check passed
@edenreich
edenreich deleted the feat/compute-tab branch November 8, 2026 17:07
@inference-gateway-maintainer

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.60.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 9, 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] Compute tab: configure clusters once and let workspaces pick one

1 participant