Repository navigation
feat(teleport): run kubernetes workspaces as operator Orchestrators - #1660
Merged
Merged
Conversation
A kubernetes workspace now creates one Inference Gateway operator Orchestrator per session with runtime: Sandbox, instead of building an agent-sandbox Sandbox and its pod itself. A teleport to a cluster that does not serve Orchestrators fails at provisioning, before the TLS Secret or anything else is created, and /workspaces reports the same. The operator's pod has no Kubernetes API access, so the pod daemon no longer suspends its own Sandbox. When it idles out it leaves agents-done=<bool> as its termination message, and the operator parks the Orchestrator and starts its retention. A client resumes it by setting spec.sandbox.operatingMode back to Running. The session-teleport example installs operator v0.28.0 after agent-sandbox, drops the self-suspend RBAC, and starts the desktop from an infer wrapper on PATH, since the operator runs the pod's infer daemon by name. Requires operator v0.28.0 or later.
This was referenced Oct 31, 2026
Merged
…apper Operator v0.28.1 keeps the image entrypoint and passes daemon as its argument (inference-gateway/operator#302). The session-teleport example pins it, and the desktop image starts Xvfb and Chromium from its own entrypoint again instead of an infer wrapper on PATH. The docs and the operator-missing error name v0.28.1 as the minimum.
This was referenced Oct 31, 2026
Contributor
|
🎉 This PR is included in version 0.239.0-rc.10 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Contributor
|
🎉 This PR is included in version 0.239.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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
A
kind: kubernetesworkspace now creates one Inference Gateway operatorOrchestratorper session withruntime: Sandbox, instead of building an agent-sandboxSandboxand its pod itself. A teleport to a cluster without the operator fails atprovisioningbefore anything is created. This covers the operator todo on #1653.Requires operator v0.28.1 or later (inference-gateway/operator#298, inference-gateway/operator#302).
Changes
internal/agent/infrastructure/kubernetes/workspace.gorequireOperatorasks discovery forcore.inference-gateway.com/v1alpha1orchestratorsbefore anything else. Without it,Ensure,ReachandProbereportthe Inference Gateway operator is not installed in the cluster of workspace <name>. No Secret or Orchestrator is created.runtime: Sandbox,sandbox(storage, retention, operating mode), and a binding authenticated by the session's Secret with mTLS. It also setstools.enabledanda2a.enabled, which the operator would otherwise force off, and the workspace env.runtime: Sandboxrefusesspec.runtimeinstead of running a Deployment.awaitReadywaits forReadyat the current generation and returnsstatus.podName. It resumes an Orchestrator found suspended, including one the operator parks during the wait. It fails fast onSandboxCRDMissingandInvalidSpec.agents-done=<bool>to/dev/termination-logand exits 0, and the operator parks the Orchestrator and starts its retention.SelfSuspend,teleport.Service.Suspendand its dep are removed.Registry.AgentsDonereturns a single bool.examples/session-teleporttask cluster:createinstalls operator v0.28.1 after agent-sandbox, because the operator looks for agent-sandbox only at startup. k3s already ships the Gateway API CRDs the operator needs.docs/daemon.md(prerequisites, kubeconfig RBAC, abort behavior, retention), the protocol and commands references, the session-teleport README and troubleshooting, and the agent and sessions READMEs.Cross-repo
Command: ["infer"]on the daemon container, which skipped the desktop image's entrypoint. Fixed in v0.28.1 ([BUG] Orchestrator overrides the image entrypoint with command infer operator#302), which this PR now requires.Out of scope
runtime_class(gVisor or Kata) indaemon.yaml. The operator supports it, but nobody asked for it yet.Sandboxobjects that earlier release candidates left behind share the new Orchestrator names. Delete them by hand (see the example's troubleshooting).Test plan
go test -raceforinternal/agent/...,internal/sessions/...andcmd/daemon/..., plustask testtask precommit:runinfer-workspaceswithout the operator:infer daemon workspacesandinfer daemon teleport --to k8s-devreport the operator missing, the session stays on the laptop, and no new Secret is createdk8s-devshows RUNTIMESandboxand READYtrue, and a turn runs on the podagents-done=trueand a 24hshutdownTime, and the next turn resumes it with the countdown clearedinfer daemon teleport --to laptopbrings the session back, and that pod reports agents doneinfer daemon stopdeletes the Orchestrator, its Secret and both volumestask demo TARGET=k8s-desktop PROMPT="browse to example.com"on v0.28.1 with the unchanged desktop image: the pod runs the image entrypoint with args["daemon"], andtask desktop:screenshotshows Chromium on example.com under the operator's non-root pod without capabilitiestask chatwalkthrough in the TUI:say helloon⌂ laptop,/workspaceslists both Kubernetes workspaces reachable with their orchestrator count, teleport tok8s-desktop,browse to example.comruns everyComputercall in the pod,/teleport laptopbrings it back and the next turn answers locallytask artifacts:list)