Repository navigation
Description
Summary
The Orchestrator's status contract is defined as unexported string literals in internal/controller, so a client that reads it has to copy the strings. The CLI's Kubernetes workspace adapter (internal/agent/infrastructure/kubernetes in inference-gateway/cli) does exactly that, and a renamed value in the operator breaks it without a compile error.
What the CLI copies today:
| Value | Operator | CLI |
|---|---|---|
Condition type Ready |
literals in orchestrator_controller.go (Type: "Ready") |
workspace.go, readyCondition |
Reasons InvalidSpec, SandboxCRDMissing |
literals passed to patchStatusNotReady |
workspace.go, unrecoverableReasons |
Termination message agents-done=true |
agentsDoneMessage in orchestrator_sandbox.go |
self.go, ReportIdle |
The CLI fails a teleport fast on an unrecoverable reason. If the operator renamed InvalidSpec, the CLI would no longer recognize it and would wait out its five minute ready timeout instead. GatewayNotFound is the third reason the controller reports and has no shared name either.
The types themselves are already consumable. api/v1alpha1 keeps controller-runtime out (the local schemeBuilder), and linking it into the CLI costs about 0.9MB (81.70MB to 82.62MB stripped) and adds sigs.k8s.io/gateway-api/apis/v1 and k8s.io/api/autoscaling/v2. Only the contract strings are missing. The CLI also builds its Orchestrators as untyped maps today, a CLI-side change to make once these are exported.
Proposed shape, in api/v1alpha1/orchestrator_types.go beside SandboxRunning and SandboxSuspended:
const (
OrchestratorConditionReady = "Ready"
ReasonInvalidSpec = "InvalidSpec"
ReasonSandboxCRDMissing = "SandboxCRDMissing"
ReasonGatewayNotFound = "GatewayNotFound"
// AgentsDoneMessage is the termination message a pod daemon writes once
// every agent on it is done, which lets the operator suspend the Sandbox.
AgentsDoneMessage = "agents-done=true"
)Acceptance Criteria
- The Orchestrator Ready condition type, every reason the controller sets on it, and the agents-done termination message are exported from
api/v1alpha1. - The controllers use the exported names, so no literal of them is left in
internal/controller. - Each reason's doc comment says whether the Orchestrator can recover without a change to its spec or the cluster, which is how a client decides to fail fast or keep waiting.
- The values stay unchanged, so released CLIs keep working.
Activity
inference-gateway-releaser commentedon Nov 8, 2026
🎉 This issue has been resolved in version 0.33.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀
refactor(kubernetes): read the Orchestrator status contract from the …