You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE] Scale a Gateway to zero while every Orchestrator using it is suspended #305
Scale a Gateway to zero while every Orchestrator that uses it is suspended, and back up when one resumes.
The infer CLI now deploys one Gateway per Kubernetes workspace beside the workspace's sessions. Each session's runtime: Sandbox Orchestrator owns it, so the Gateway goes with the last session. When the sessions idle out, the
operator suspends their Orchestrators and the pods go, but the Gateway keeps a pod running until the last retention runs
out, a day by default in the session-teleport example. The CLI cannot scale it: it is not running when the operator
suspends, and the Sandbox pods have no Kubernetes API access.
A suggested shape: Orchestrator.spec.gateway.ref names a Gateway in the same namespace. The operator then derives INFER_GATEWAY_URL from that Gateway's Service, so clients stop hard-coding its port. It also runs the Gateway with spec.replicas while any referencing Orchestrator runs and with zero while all of them are suspended. Using the
Gateway's Orchestrator owner references instead would work without an API change.
Acceptance Criteria
A Gateway whose Orchestrators are all suspended has no running pod, and its Deployment and Secret stay.
Resuming one of them (spec.sandbox.operatingMode: Running) scales the Gateway back up before the
Orchestrator reports Ready, so the daemon's first call reaches it.
A Gateway no Orchestrator references keeps its spec.replicas and HPA behavior unchanged.
The Orchestrator docs and samples cover the Gateway link and the scaling.
Orchestrator.spec.gateway.ref names a Gateway in the same namespace, mutually exclusive with url (CEL)
The daemon's INFER_GATEWAY_URL is derived from that Gateway's Service - no hard-coded port
The Gateway runs with 0 replicas while every Orchestrator referencing it is suspended, back to spec.replicas when one resumes (Gateway controller now watches Orchestrators)
A parked Gateway has no HPA while parked (an HPA would undo the parking) and gets one again when unparked; Deployment, Service and Secrets stay
A Gateway no Orchestrator references keeps spec.replicas and HPA unchanged
Tests: task test green, task lint 0 issues
Docs + samples: new README section "Link the daemon to a Gateway", pointer from the Sandbox operatingMode bullet, config/samples/core_v1alpha1_orchestrator_sandbox.yaml switched to ref
spec.gateway.ref instead of the ownerReference variant: it is declarative, and it does not tie the Gateway's lifetime to one session. The replica rule lives in one place now - the Deployment update path follows the count the builder computed (parked / HPA / spec.replicas) instead of recomputing it from the spec.
Not done / risk: the resume ordering is concurrent, not sequenced. The scale-up is enqueued by the same event that resumes the Sandbox, but the Orchestrator's Ready is not held back until the Gateway has an available replica, so a daemon calling the gateway in its very first instant could still race a cold pod. Gating readiness on the linked Gateway's status.availableReplicas is a small follow-up if you want it. No new Gateway status field explaining why it is parked.
• branch • PR #307
Activity
feat(teleport): deploy a gateway per kubernetes workspace that holds …
edenreich commentedon Oct 31, 2026
@claude can you work on this? use /ponytail:ponytail /domain-driven-design /clean-architecture
inference-gateway-maintainer commentedon Oct 31, 2026
Claude finished @edenreich's task in 12m 54s —— View job •
feat/issue-305-20261031-1958• [Create PR ➔](https://github.com/inference-gateway/operator/compare/main...feat/issue-305-20261031-1958?quick_pull=1&title=Issue%20%23305%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%23305%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)Scale a Gateway to zero while every Orchestrator using it is suspended
Orchestrator.spec.gateway.refnames aGatewayin the same namespace, mutually exclusive withurl(CEL)INFER_GATEWAY_URLis derived from that Gateway's Service - no hard-coded portspec.replicaswhen one resumes (Gateway controller now watches Orchestrators)spec.replicasand HPA unchangedtask testgreen,task lint0 issuesoperatingModebullet,config/samples/core_v1alpha1_orchestrator_sandbox.yamlswitched torefreffor workspaces to benefit)Shape
spec.gateway.refinstead of the ownerReference variant: it is declarative, and it does not tie the Gateway's lifetime to one session. The replica rule lives in one place now - the Deployment update path follows the count the builder computed (parked / HPA /spec.replicas) instead of recomputing it from the spec.Not done / risk: the resume ordering is concurrent, not sequenced. The scale-up is enqueued by the same event that resumes the Sandbox, but the Orchestrator's
Readyis not held back until the Gateway has an available replica, so a daemon calling the gateway in its very first instant could still race a cold pod. Gating readiness on the linked Gateway'sstatus.availableReplicasis a small follow-up if you want it. No new Gateway status field explaining why it is parked.• branch • PR #307
inference-gateway-releaser commentedon Oct 31, 2026
🎉 This issue has been resolved in version 0.29.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀