Skip to content

refactor(kubernetes): read the Orchestrator status contract from the operator's api/v1alpha1 - #1770

Merged
edenreich merged 1 commit into
mainfrom
refactor/orchestrator-status-contract
Nov 8, 2026
Merged

edenreich merged 1 commit into
mainfrom
refactor/orchestrator-status-contract

Conversation

@edenreich

Copy link
Copy Markdown
Contributor

Summary

The Kubernetes workspace adapter copied the Orchestrator's status contract as string literals, so a renamed value in the operator would break a teleport without a compile error. Operator v0.33.0 exports the contract from api/v1alpha1 (inference-gateway/operator#322), and the adapter now reads it from there:

  • readyCondition in workspace.go matches the condition type OrchestratorConditionReady.
  • unrecoverableReasons in workspace.go, the reasons a teleport fails fast on, are ReasonSandboxCRDMissing and ReasonInvalidSpec.
  • ReportIdle in self.go writes AgentsDoneMessage when every agent is done.

The fail-fast list keeps the same two reasons. Their doc comments in the operator say they need a change to the cluster or the spec. ReasonSandboxSuspended needs a spec change too, but awaitReady makes it itself by resuming the Orchestrator, and the doc comment now says so. GatewayNotFound, SandboxNotReady and DeploymentNotAvailable can clear on their own, so a teleport keeps waiting on them.

Closes #1769

Dependency

  • go.mod requires github.com/inference-gateway/operator v0.33.0. It uses the same k8s.io v0.37.2 modules as the CLI, adds sigs.k8s.io/gateway-api as an indirect dependency, and moves github.com/google/gnostic-models from v0.7.0 to v0.7.1.
  • The stripped purego binary grows by about 0.87MB, from 81.92MB to 82.79MB.
  • The kubernetes-only-in-the-kubernetes-adapters depguard rule now also confines github.com/inference-gateway/operator to the two Kubernetes adapters. An import from internal/sessions is refused by that rule.
  • operatorv1alpha1 joins the canonical aliases in AGENTS.md, and internal/agent/README.md names the operator's API types beside client-go.

Compatibility

The values are unchanged, so every operator release that reports them keeps working. The workspace tests still build their fake Orchestrators and expected termination messages from the literal strings, so they pin the wire values the adapter has to match.

Verification

  • task test passes.
  • task test:e2e: every test passes except TestChatTUIAnswersAQuestion, which failed in both full runs. It is flaky without this change: run alone, it failed one of three runs on the commit before feat(workspaces): Kubernetes workspaces give their pods MCP servers #1767 and one of three on main. It passes when run alone on this branch twice.
  • task precommit:run passes.

no docs ticket: internal-only refactor

…operator's api/v1alpha1

The Kubernetes workspace adapter compared the Orchestrator's condition type
with a copied "Ready", failed fast on copied "SandboxCRDMissing" and
"InvalidSpec" reasons, and wrote a copied agents-done message. Operator
v0.33.0 exports all three from api/v1alpha1, so the adapter reads them from
there and a renamed value fails the build instead of a teleport.

The fail-fast list keeps the same two reasons. SandboxSuspended also needs a
spec change, which awaitReady makes itself by resuming the Orchestrator.

The operator module is confined to the two Kubernetes adapters by the same
depguard rule as client-go. It adds about 0.87MB to the stripped binary.
@edenreich
edenreich requested a review from a team as a code owner November 8, 2026 22:51
@github-project-automation github-project-automation Bot moved this to Todo in 2026 Nov 8, 2026
@edenreich
edenreich merged commit f0f2874 into main Nov 8, 2026
1 check passed
@edenreich
edenreich deleted the refactor/orchestrator-status-contract branch November 8, 2026 23:10
@edenreich edenreich moved this from Todo to Done in 2026 Nov 8, 2026
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.250.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@inference-gateway-releaser inference-gateway-releaser 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

Status: Done

Development

Successfully merging this pull request may close these issues.

[TASK] Refactor read the Orchestrator status contract from the operator's api/v1alpha1

1 participant