Repository navigation
feat(k8s): run one shared supervisor per node - #6074
Open
Gal-Zaidman wants to merge 6 commits into
Open
Gal-Zaidman wants to merge 6 commits into
Gal-Zaidman wants to merge 6 commits into
Conversation
Record the per-node model as the next one after the per-gateway model. Each shared supervisor proves its Pod with a pod-bound token, a per-node supervisor can claim only its own node's member ID, and a per-node sandbox never falls back to a supervisor on another node. Signed-off-by: Gal Zaidman <gzaidman@nvidia.com>
Contributor
Author
|
@FrostGod can you please review? |
All shared supervisor Pods present the same gateway-minted supervisor token, so anyone holding a copy of the token Secret could attach as a supervisor. The gateway now accepts the supervisor token only beside a projected ServiceAccount token (audience openshell-supervisor) that TokenReview and a live-Pod check resolve to a Pod of shared_supervisor.service_account_name. - shared_supervisor.service_account_name is required; the driver registers it with the controller, and the gateway refuses to start the topology without it. - The supervisor sends the token from --identity-token-file in the x-openshell-host-identity-token header, re-read on every attempt. - Helm renders the supervisor ServiceAccount without RBAC, runs the supervisor as it, and mounts a 10-minute projected token. Signed-off-by: Gal Zaidman <gzaidman@nvidia.com>
Accept supervisor_topology = "node". The gateway records the node that a supervisor's pod identity token proves on HostIdentity, and in the node topology the driver binds pool members to nodes, so the gateway refuses host streams whose pool member ID is not that node. Launches stay refused until node-local placement lands. Signed-off-by: Gal Zaidman <gzaidman@nvidia.com>
Carry the pool member through SharedSupervision::launch, PlacementRequest, the stored assignment record, and recovery, and restrict launch, takeover, and unowned placement of a pinned instance to that member. With members bound to nodes, the pool never places an unpinned instance: one launched under the gateway topology stays where it is until the recovery timeout ends it. In the node topology the Kubernetes driver ungates the workload Pod, waits for the scheduler to bind it, launches on that node's supervisor, records the member on the Sandbox resource for recovery, and creates the bootstrap Secret last. Supervisors started with --node-supervisor (OPENSHELL_SUPERVISOR_NODE) no longer leave the pool on shutdown, and a suspended generation forgets its member. Signed-off-by: Gal Zaidman <gzaidman@nvidia.com>
With supervisor_topology = "node", the chart renders the supervisor as a DaemonSet on every node, started with --node-supervisor and with the node name as each Pod's pool member ID. The Service keeps runtimes on their own node with internalTrafficPolicy: Local, and the node topology renders no PodDisruptionBudget or HPA. supervisor.tolerations and supervisor.nodeSelector place supervisors on tainted or selected sandbox nodes, such as GPU nodes. Adds the e2e:kubernetes:shared-supervisor-node task on a two-node k3d cluster, and documents the topology, its platform preconditions, and that switching topologies ends running shared sandboxes. Signed-off-by: Gal Zaidman <gzaidman@nvidia.com>
With supervisor_topology = "node", create and restart now return after the driver removes the scheduling gate. The bootstrap launches on the node once the scheduler binds the workload Pod, and a failed launch or a Pod that isn't scheduled within runtime_bootstrap_grace_seconds is logged and rolls the bootstrap back like any stale bootstrap. A shared supervisor now marks its boundary as stopping on every requested stop, so stopping a workload that is already gone no longer waits for a reconnect to time out and stall later instance removals. Update the Kubernetes HA docs, the driver README, and the debug-openshell-cluster skill to match. Signed-off-by: Gal Zaidman <gzaidman@nvidia.com>
Gal-Zaidman
force-pushed
the
feat/6026-node-supervisor-topology/Gal-Zaidman
branch
from
November 29, 2026 22:55
f016810 to
62c3514
Compare
This branch has not been deployed
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
Add a
nodesupervisor topology for Kubernetes. One shared supervisor runs on each node as a DaemonSet, and each sandbox is served by the supervisor on the node its workload Pod is scheduled to. RFC 0018 records the per-node model.Related Issue
Closes #6026
Changes
openshell-supervisor) that binds a session to its Pod and node. The gateway verifies any token it receives.require_identity_token(Helmsupervisor.requireIdentityToken, defaultfalse) makes the token mandatory, and node topology always requires it.supervisor_topology = "node"binds pool members to nodes. After the scheduler binds the workload Pod, the driver launches the sandbox on that node's supervisor. If the launch can't be placed, the bootstrap rolls back.supervisor.topology: noderenders the supervisor as a DaemonSet (rolling withmaxSurge: 0,maxUnavailable: 1) and caps the per-member instance limit at 1,024.requireIdentityToken), the driver and supervisor-control READMEs, the debug skill, and a newe2e:kubernetes:shared-supervisor-nodetask.Release Notes
Kubernetes deployments can run one shared supervisor per node with
supervisor.topology: node. When upgrading a gateway-topology deployment, setsupervisor.requireIdentityToken=trueonly after every supervisor has rolled to the new version.Testing
kubectl_jsonimport that breaks the HA test build onmainas well; that fix is tracked separately.Checklist