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] Expose gateway round-robin model routing (ROUTING_ENABLED / ROUTING_CONFIG_PATH) #175
The gateway now supports opt-in round-robin model routing over upstream pools (Phase 1 of #397), shipped in gateway v0.39.0 via PR inference-gateway/inference-gateway#490. The docs for it are already in place (docs issue #464). The operator does not yet expose this feature, so users running the gateway through the operator cannot enable routing declaratively.
Routing is driven by two env vars on the gateway:
ROUTING_ENABLED - boolean toggle (default: off).
ROUTING_CONFIG_PATH - path to a YAML file describing model-alias -> ordered provider/model pools.
The operator needs to surface both, and provide a way to supply the routing config YAML (mounted at ROUTING_CONFIG_PATH).
Proposed approach
Add a routing section to the Gateway CRD spec:
routing.enabled -> ROUTING_ENABLED.
routing.config (inline YAML) or routing.configMapRef -> rendered/mounted at ROUTING_CONFIG_PATH, with ROUTING_CONFIG_PATH set accordingly.
Reconcile the config into a ConfigMap and mount it into the gateway pod when routing.enabled is true.
Update the Helm chart values and the generated CRD manifests to match.
Add example manifest(s) showing an alias mapping to a 2+ deployment pool.
Acceptance Criteria
Gateway CRD exposes routing.enabled and a way to supply the routing config; both map to ROUTING_ENABLED / ROUTING_CONFIG_PATH on the gateway container.
Routing config is delivered to the pod (ConfigMap mount) and ROUTING_CONFIG_PATH points at it.
Helm values + generated CRD/manifests updated; example manifest added.
The env vars are ROUTING_*, but spec.routing is already taken on this CRD for north-south Kubernetes Gateway API traffic - a different concept. To avoid conflating them, the new feature lives under spec.modelRouting:
modelRouting.enabled -> ROUTING_ENABLED
modelRouting.config (inline YAML) -> rendered into an operator-owned ConfigMap <gateway>-routing, mounted at /etc/inference-gateway/routing, with ROUTING_CONFIG_PATH pointed at the file
modelRouting.configMapRef -> mounts an existing ConfigMap key instead
The reconciler creates/updates/deletes the ConfigMap (reconcileModelRoutingConfig), mounts it, sets the env vars, and now Owns ConfigMaps.
Notes
Like the existing oidc-ca / tls mounts, the config file updates in place but the gateway reads it at startup, so editing modelRouting.config needs a pod restart to take effect (flagged with a ponytail: comment + upgrade path).
Activity
edenreich commentedon Jul 22, 2026
@claude Can you implement this? use /go /go-concurrency /ponytail:ponytail
inference-gateway-maintainer commentedon Jul 22, 2026
Claude finished @edenreich's task in 15m 34s —— View job •
feat/issue-175-20260722-2109Implemented: round-robin model routing (
ROUTING_ENABLED/ROUTING_CONFIG_PATH)modelRoutingsection to Gateway CRD spec (enabled,config,configMapRef)ROUTING_ENABLED/ROUTING_CONFIG_PATHenv + ConfigMap mount in reconcilertask test(controller suite green, 63.4% cover) +task lint(0 issues)PR: #176
Key decision
The env vars are
ROUTING_*, butspec.routingis already taken on this CRD for north-south Kubernetes Gateway API traffic - a different concept. To avoid conflating them, the new feature lives underspec.modelRouting:modelRouting.enabled->ROUTING_ENABLEDmodelRouting.config(inline YAML) -> rendered into an operator-owned ConfigMap<gateway>-routing, mounted at/etc/inference-gateway/routing, withROUTING_CONFIG_PATHpointed at the filemodelRouting.configMapRef-> mounts an existing ConfigMap key insteadThe reconciler creates/updates/deletes the ConfigMap (
reconcileModelRoutingConfig), mounts it, sets the env vars, and nowOwnsConfigMaps.Notes
modelRouting.configneeds a pod restart to take effect (flagged with aponytail:comment + upgrade path).Create a PR · · branch
feat/issue-175-20260722-2109feat(gateway): add round-robin model routing config
chore(release): 🔖 0.21.0 [skip ci]
inference-gateway-releaser commentedon Jul 23, 2026
🎉 This issue has been resolved in version 0.21.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀
feat(gateway): add round-robin model routing config (#176)