Skip to content

feat(k8s): run one shared supervisor per node - #6074

Open
Gal-Zaidman wants to merge 18 commits into
ai-openshell:mainfrom
Gal-Zaidman:feat/6026-node-supervisor-topology/Gal-Zaidman
Open

Gal-Zaidman wants to merge 18 commits into
ai-openshell:mainfrom
Gal-Zaidman:feat/6026-node-supervisor-topology/Gal-Zaidman

Conversation

@Gal-Zaidman

@Gal-Zaidman Gal-Zaidman commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add a node supervisor 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

  • RFC 0018: decides the per-node model.
  • Supervisor identity: shared supervisors started with --identity-token-file present a projected ServiceAccount token (audience openshell-supervisor) that binds a session to its Pod and node. The gateway verifies any token it receives and ends the stream when that token expires, so these supervisors reconnect about every 8 minutes. require_identity_token (Helm supervisor.requireIdentityToken, default false) makes the token mandatory, and the node topology always requires it. shared_supervisor.service_account_name is optional in the gateway topology: without it, the gateway accepts the supervisor token alone, as before, so existing hand-written configs keep working.
  • Driver: supervisor_topology = "node" binds pool members to nodes. Sandbox Pods get a required Pod affinity to a supervisor Pod on their node, so the scheduler places them only on nodes running a supervisor. After the scheduler binds the workload Pod, the driver waits for that node's supervisor and launches the sandbox on it. The launch never overwrites a stop, delete, or newer attempt made meanwhile. A create that cannot be launched within runtime_bootstrap_grace_seconds enters Error with its cause, which openshell sandbox create reports, and is deleted within 30 seconds; a restart that cannot be launched ends stopped.
  • Pool: node-topology instances are pinned to their node's supervisor for placement and takeover, and placed only on a supervisor whose identity token proves it runs on that node. The gateway refuses warm-pool preparation in the node topology, because a spare is prepared before the scheduler picks its node.
  • Supervisor: stopping a sandbox instance now marks its runtime as stopping in both topologies, not only when the stop ends the supervisor process. Before, stopping an instance whose workload was already gone waited for a reconnect to the workload until the 20-second grace aborted it.
  • Helm: supervisor_topology: node under gatewayConfig renders the supervisor as a DaemonSet that rolls with maxSurge: 0 and supervisor.updateStrategy.maxUnavailable (default 1). maxInstancesPerMember defaults to 300 in the node topology and stays overridable from 1 to 1,024. supervisor.priorityClassName is empty by default; the docs recommend system-node-critical.
  • Docs and skills: the gateway configuration reference, the Kubernetes HA guide (the upgrade order for requireIdentityToken, settings for dense sandbox nodes, and raising runtime_bootstrap_grace_seconds for autoscaled node pools), the driver and supervisor-control READMEs, the debug skill, and a new e2e:kubernetes:shared-supervisor-node task.
  • CI: Branch E2E runs the node-topology lane on a kind cluster with two worker nodes when a PR has the test:e2e-kubernetes label.

Release Notes

Kubernetes deployments can run one shared supervisor per node with supervisor_topology: node. When upgrading a gateway-topology deployment, set supervisor.requireIdentityToken=true only after every supervisor has rolled to the new version.

Testing

  • Checks appropriate to the affected code and behavior pass (clippy, rustfmt, workspace unit tests for the changed crates, Helm unit tests, gateway config parser check)
  • Unit tests added/updated
  • E2E tests added/updated: new node topology suite. On images built from this branch, every suite passed conformance (77/77) and its own tests: node topology (9/9), gateway topology (1/1), scaling (8/8), SPIFFE (8/8), and SPIFFE node-local (8/8). The HA suite passed 10/10 after locally adding a missing kubectl_json import that breaks the HA test build on main as well; that fix is tracked separately. On the current head, rebased on main, the node topology lane passed on a two-node k3d cluster (conformance 93/93 and the node topology tests, with no failures).

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)

@github-actions github-actions Bot added the state:accepted A maintainer decided OpenShell should pursue this issue label Nov 29, 2026
@Gal-Zaidman

Copy link
Copy Markdown
Contributor Author

@FrostGod can you please review?

@Gal-Zaidman
Gal-Zaidman force-pushed the feat/6026-node-supervisor-topology/Gal-Zaidman branch from f016810 to 62c3514 Compare November 29, 2026 22:55
@FrostGod
FrostGod self-requested a review November 30, 2026 06:23
@FrostGod

Copy link
Copy Markdown
Contributor

sure @Gal-Zaidman , I can look into this sometime in the first half of the week.
thanks for taking this up

@gator-review-bot

Copy link
Copy Markdown

gator-agent

Blocked

The required Branch Checks and Helm Lint runs for this fork PR are awaiting GitHub Actions approval. The first team code review is deferred until the workflow approval blocker clears.

Action required: A maintainer needs to approve the Branch Checks and Helm Lint runs in GitHub Actions.

Gator metadata
  • Validation: Linked issue feat(k8s): run one shared supervisor per node #6026 is accepted and the PR implements its Kubernetes node topology.
  • Head SHA: 62c351459cf0b59ccc417942d6e825d69e0c6a02
  • Base SHA: 659b45f3bed896897de20a8b67289916a3d9fffc
  • Merge base SHA: 659b45f3bed896897de20a8b67289916a3d9fffc
  • Patch ID: 86cbf48d2503077dd06c46c5711b4e42a15f383a
  • Gator payload: 19
  • Review mode: initial; reviewer deferred for process blockers
  • Next state: gator:blocked
  • Blocked reason: test_dispatch_required

@gator-review-bot gator-review-bot Bot added the gator:blocked Gator is blocked by process or repository gates label Dec 1, 2026

@gator-review-bot gator-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gator-agent

PR Review Status

The workflow approval blocker cleared, and the team reviewed the current head. Five blocking findings remain, including a node isolation regression during topology changes.

Action required: Please address the five inline findings and push an updated head for follow-up review.

Blocking findings

  • GATOR-62c35145-01 (Critical) Require verified node identity for pool assignments
  • GATOR-62c35145-02 (Warning) Expire supervisor authorization with the Pod identity
  • GATOR-62c35145-03 (Warning) Preserve existing gateway topology configuration on upgrade
  • GATOR-62c35145-04 (Warning) Fence deferred launch against a concurrent stop
  • GATOR-62c35145-05 (Warning) Retry transient Kubernetes reads after scheduling

Carried findings: None

Non-blocking suggestions: None

Gator metadata
  • Validation: Accepted issue #6026 covers the per-node supervisor topology.
  • Docs: Existing Fern gateway and Kubernetes guides were updated.
  • Checks: DCO, Helm Lint, and Trivy Changes passed. Branch Checks are pending.
  • E2E: Kubernetes E2E is applicable. Current-head Kubernetes jobs were skipped.
  • Head SHA: 62c351459cf0b59ccc417942d6e825d69e0c6a02
  • Base SHA: 659b45f3bed896897de20a8b67289916a3d9fffc
  • Merge base SHA: 659b45f3bed896897de20a8b67289916a3d9fffc
  • Patch ID: 86cbf48d2503077dd06c46c5711b4e42a15f383a
  • Gator payload: 19
  • Review mode: initial
  • Specialist consults: review-security
  • Previous reviewed SHA: none
  • Review budget exhausted: no
  • Maintainer decision required: no
  • Next state: gator:in-review

pub token_secret_name: String,
/// `ServiceAccount` in `service_namespace` the supervisor Pods run as; a
/// pod-bound token for it accompanies the supervisor token.
pub service_account_name: String,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gator-agent

Warning — GATOR-62c35145-03 · Preserve existing gateway topology configuration on upgrade

Summary
Operators upgrading with an existing file-based gateway topology configuration now fail at startup because the shared supervisor table requires a ServiceAccount name even when Pod identity enforcement is disabled.

Fix
Accept an omitted account for gateway topology when identity enforcement is disabled. Require an explicit account in node topology or when identity is enforced, and reject supplied Pod credentials when no resolver is configured.

Verify
Load the existing four-field TOML fixture and verify legacy supervisor attachment still works. Check that missing account configuration fails for node topology and explicit identity enforcement.

Agent context

crates/openshell-driver-kubernetes/src/config.rs:244

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in e505af1. service_account_name is optional again. The gateway
topology can omit it, and then the gateway accepts the supervisor token
alone, as before. Config validation requires it only in the node topology or
with require_identity_token. Supervisors send the identity token only when
started with --identity-token-file, which --node-supervisor requires. A
gateway without the account refuses an identity token it can't verify.

@gator-review-bot gator-review-bot Bot added gator:in-review Gator is reviewing or awaiting PR review feedback and removed gator:blocked Gator is blocked by process or repository gates labels Dec 1, 2026

@FrostGod FrostGod left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few general points:

  • Readiness is a TCP check, so a supervisor that can't attach to the gateway still counts as ready and the DaemonSet rollout keeps going. It would be safer if ready meant attached.
  • E2E: no test yet for a node supervisor restart (sandboxes freeze, then resume), the new-node race, or a taint mismatch.
  • Docs: for dense nodes (for example 360 sandboxes per node), mention raising kubelet maxPods and the node's pod CIDR.

if read_awaiting().await.is_none() {
return;
}
let launch = Box::pin(self.launch_sandbox_runtime_generation(generation, Some(node))).await;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the node's supervisor hasn't attached yet, this launch fails and the sandbox is rolled back. With the cluster autoscaler that's the normal case: the new node and the supervisor DaemonSet Pod come up together. Could we wait for the member to attach, within runtime_bootstrap_grace_seconds, before launching?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 21c0008. After the sandbox Pod is scheduled, the launch now waits, up to runtime_bootstrap_grace_seconds, for that node's supervisor to connect, so a new autoscaled node works. If it never connects, the sandbox fails with "no supervisor attached on node X". The HA guide also says to raise the grace if your autoscaler adds nodes slower than 5 minutes.

}
let launch = Box::pin(self.launch_sandbox_runtime_generation(generation, Some(node))).await;
if let Err(error) = launch {
warn!(sandbox = cr_name, %error, "sandbox-runtime launch on the scheduled node failed; rolling back");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this also emit a Kubernetes Event on the Sandbox, or a metric? Today the user just sees the sandbox deleted, and the reason is only in the gateway logs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one is partly done in 0c7fa11. When a new sandbox can't be launched on its node, it now goes to Error with the reason, for example "no supervisor attached on node X within 300s". openshell sandbox create shows that reason to the user, and the sandbox is deleted about 30 seconds later. So the reason isn't hidden in the gateway logs anymore.
I didn't add a Kubernetes Event or a metric yet. Both need a bit more thought (permissions to create Events, and names that we'd have to keep stable), so if needed this should probably land in a dedicated follow-up to handle K8S events and metrics.
Do you want me to open an issue to track such an effort?

app.kubernetes.io/component: supervisor
spec:
{{- if $node }}
# No surge: two live members with one node's ID would keep superseding each

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With one supervisor per node, a crash or rollout freezes every sandbox on that node. We've seen about 360 sandboxes on a single 192-vCPU Vera node. Worth considering two members per node (for example node/a and node/b), with takeover allowed only within the node. Fine as a follow-up.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, and like you said, it makes sense as a follow-up. This PR relies on
"one supervisor per node, named after the node" in several places, so
supporting two per node needs its own design. I'll open an issue and update
RFC 0018 for it.

Until then, priorityClassName keeps the supervisor from being evicted
before its sandboxes, and the default rollout only pauses one node at a time.

type: RollingUpdate
rollingUpdate:
maxSurge: 0
maxUnavailable: 1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make maxUnavailable a Helm value (default 1, allowing something like 10%)? With about 2,000 nodes, one node at a time makes a rollout take a very long time.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 79b9abb: supervisor.updateStrategy.maxUnavailable, default 1, takes a number or a percentage like "10%". maxSurge stays 0, so two supervisors never run on the same node. The values comment notes that a higher value pauses more nodes' sandboxes at once.

{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.supervisor.nodeSelector }}
nodeSelector:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we also add supervisor.priorityClassName? If the kubelet evicts the supervisor under memory pressure before the sandboxes, the whole node freezes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 79b9abb. supervisor.priorityClassName is empty by default, like the gateway's. The docs recommend system-node-critical for the node topology, so other Pods are evicted before the supervisor, and mention that some clusters need a ResourceQuota to allow that class outside kube-system.

{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.supervisor.tolerations }}
tolerations:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sandboxes can still be scheduled to a node without a supervisor (a taint or node-pool mismatch) and then get rolled back. Could the driver add required pod affinity from the sandbox Pod to the supervisor Pods on kubernetes.io/hostname, so the scheduler only picks nodes that have one?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 788712f. In the node topology, the driver gives each sandbox's
workload Pod a required Pod affinity, on kubernetes.io/hostname, to the
Pods the supervisor Service selects. The scheduler then places sandboxes only
on nodes running a supervisor. A sandbox that fits no such node stays
Pending and fails when runtime_bootstrap_grace_seconds ends. A restart
sets the rule again, and a restart outside this topology clears it. Users'
own affinity rules aren't affected, because the driver sets no other workload
affinity. The rule matches only the supervisor Pods in one namespace, so it
should be cheap for the scheduler. I haven't measured it on a large cluster.

*/}}
{{- define "openshell.supervisorMaxInstancesPerMember" -}}
{{- if include "openshell.supervisorNodeTopology" . -}}
1024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forcing 1024 also raises the gateway-to-supervisor message size limit about 8x, since it scales with this cap. Real usage is bounded by kubelet maxPods, so maybe keep honoring maxInstancesPerMember here, or use a lower default.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 79b9abb. The node topology no longer forces 1,024. It defaults to 300, which is above the kubelet's default maxPods, and an explicit supervisor.pool.maxInstancesPerMember now wins in both topologies. That also brings the message size limit down to match. The HA guide says to set it to at least your nodes' maxPods.

@gator-review-bot gator-review-bot Bot added gator:blocked Gator is blocked by process or repository gates and removed gator:in-review Gator is reviewing or awaiting PR review feedback labels Dec 3, 2026
@Gal-Zaidman
Gal-Zaidman requested a review from a team as a code owner December 4, 2026 18:24
@Gal-Zaidman

Copy link
Copy Markdown
Contributor Author

@FrostGod on the dense-nodes docs from your review: added in a675ca9. The node-topology section of the HA guide now covers what limits sandboxes per node: the per-supervisor cap and kubelet maxPods, the node's Pod address range (a /24 holds about 250 Pods), the pool size across gateway replicas, the priority class, and the rollout setting.

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>
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>
…ishes

The node-topology launch runs after create returns, outside the gateway's
lifecycle lock. Its member and release writes now re-check on every
conflict retry that the sandbox still awaits this launch, so a stop,
delete, or newer attempt served by another replica is never overwritten;
the existing failure path then withdraws the placed instance. A transient
error reading the sandbox before the launch is retried until the bootstrap
grace instead of abandoning the launch.

Signed-off-by: Gal Zaidman <gzaidman@nvidia.com>
On a new node the workload Pod and the node's supervisor start together,
so a launch that runs as soon as the Pod is bound found no pool member and
rolled the sandbox back. The deferred launch now waits, within the
bootstrap grace, until the gateway's pool view has the node's supervisor
live and not leaving.

Signed-off-by: Gal Zaidman <gzaidman@nvidia.com>
…on that node

Only node-topology replicas check a supervisor's claimed node at attach,
so during a topology switch a supervisor attached through a gateway-topology
replica could claim any node and be granted that node's pinned instances.
Every session already carries the node its Pod identity token proves; the
membership record now stores it, and launch, recovery placement, and
takeover grant a pinned instance only to a member whose record proves that
node.

Signed-off-by: Gal Zaidman <gzaidman@nvidia.com>
The gateway checked a supervisor's Pod identity token once per stream and
ended the stream only when the supervisor token expired, up to an hour
later, so a stream outlived the Pod that proved its node. The stream now
ends at the earlier expiry of the two tokens; the host already re-reads
both on every reconnect, and its sandboxes keep running across it.

Signed-off-by: Gal Zaidman <gzaidman@nvidia.com>
… and priority settings

The node topology forced every supervisor's cap to 1024, sizing each
gateway message for that many sandboxes. It now defaults to 300, above the
kubelet's default maxPods, and an explicit
supervisor.pool.maxInstancesPerMember overrides it in either topology.
supervisor.updateStrategy.maxUnavailable sets how many node supervisors a
rollout replaces at once, and supervisor.priorityClassName sets the
supervisor Pods' PriorityClass; system-node-critical is recommended for the
node topology.

Signed-off-by: Gal Zaidman <gzaidman@nvidia.com>
List the limits that bound how many sandboxes one node runs in the node
supervisor topology: the node's Pod address range, the pool cap, and the
supervisor's PriorityClass.

Signed-off-by: Gal Zaidman <gzaidman@nvidia.com>
A create in the node topology returns before its launch, so a later
failure deleted the sandbox with no reason the creator could see. The launch
now records the cause in openshell.ai/sandbox-runtime-launch-failure, which
the driver reports as Ready=False SandboxRuntimeLaunchFailed so the gateway
shows the create as failed. The reaper deletes such a sandbox on its next
pass, and gives a stale node-topology create a generic cause first.

Signed-off-by: Gal Zaidman <gzaidman@nvidia.com>
… cluster

Signed-off-by: Gal Zaidman <gzaidman@nvidia.com>
…dbox nodes

Signed-off-by: Gal Zaidman <gzaidman@nvidia.com>
…logy

A warm spare reserves shared supervisor capacity before its Pod is
scheduled, so it carries no node pin. With supervisor_topology = "node"
any node's supervisor could take it, the Pod could then run on another
node, and recovery refuses unpinned instances there. Node-topology
replicas now refuse unpinned placement, which warm preparation uses.

Signed-off-by: Gal Zaidman <gzaidman@nvidia.com>
…ut a service account working

A shared_supervisor table written before service_account_name existed failed to load after upgrade. The gateway topology now accepts it without the account and verifies only the supervisor token, refusing a pod-bound identity token it has no account to verify. The node topology and require_identity_token still require the account.

Signed-off-by: Gal Zaidman <gzaidman@nvidia.com>
…ing a supervisor

In the node supervisor topology, each generation's workload Pod now requires Pod affinity, on kubernetes.io/hostname, to a Pod the supervisor Service selects. The scheduler no longer places a sandbox on a node without a supervisor, where it would wait out the bootstrap grace and fail. A restart outside the node topology clears the rule. The gateway topology and dedicated supervisors are unchanged.

Signed-off-by: Gal Zaidman <gzaidman@nvidia.com>
@Gal-Zaidman
Gal-Zaidman force-pushed the feat/6026-node-supervisor-topology/Gal-Zaidman branch from 5cbc431 to 788712f Compare December 4, 2026 21:18
@Gal-Zaidman

Gal-Zaidman commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor Author

@FrostGod replying to the rest of your review.

About the missing e2e tests:

  • Supervisor restart: covered now. The node e2e test deletes one node's
    supervisor and checks that the new one picks up that node's sandbox, while
    the sandbox on the other node isn't affected. CI runs this on a two-node
    cluster when the PR has the test:e2e-kubernetes label (edb5dd7).
  • New node: the launch now waits for the node's supervisor to connect
    instead of failing right away (11cedcb). Unit tests cover a supervisor
    that connects late and one that never connects. An e2e test would need us
    to add a node in the middle of the test, which our CI setup can't do yet.
  • Taint mismatch: sandbox Pods now require a supervisor Pod on their node
    (788712f), so the scheduler won't place a sandbox on a node without one.
    The sandbox stays Pending and, after runtime_bootstrap_grace_seconds,
    fails with "the workload Pod was not scheduled within Ns". Unit tests cover
    it, but there's no e2e test yet.

About readiness meaning "attached to the gateway":

Agreed, the readiness check only looks at the port. The gateway topology has the same
tcpSocket probe on main. I didn't change it here because there's a catch:
if readiness depends on the gateway, then when the gateway is down every
supervisor in the cluster turns unready at once. We should decide what "ready" means in that
case first and define for both topologies in a dedicated PR

@gator-review-bot gator-review-bot Bot added test:e2e Requires end-to-end coverage test:e2e-kubernetes Requires Kubernetes end-to-end coverage labels Dec 4, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gator:blocked Gator is blocked by process or repository gates state:accepted A maintainer decided OpenShell should pursue this issue test:e2e Requires end-to-end coverage test:e2e-kubernetes Requires Kubernetes end-to-end coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(k8s): run one shared supervisor per node

2 participants