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
feat(k8s): give the gateway one deployment per Ollama node instead of one pinned Service connection #463
priority/p2-mediumPriority P2: standard workscope/aiAI review pipeline, personas, prompts, LLM client, or RAGscope/k8sKubernetes commands, Helm charts, pods, services, and policiestype/featureType feature: a new function
The gateway reaches Ollama through the ollama Service. kube-proxy balances per TCP connection and LiteLLM keeps its connections open, so all gateway traffic to Ollama goes to whichever pod the first connections landed on. During a full review, one Ollama node served 15 requests and the other served 0.
Because every Ollama node sits behind one gateway deployment, LiteLLM cannot see individual nodes:
max_parallel_requests is a guess for the Service as a whole. With OLLAMA_NUM_PARALLEL=1, two requests can land on the same node and queue there while another node sits idle.
A broken node (for example, one missing a model) fails some requests at random and is never cooled down, because its failures are counted against the Service deployment that covers every node.
The gateway's health report is also misleading. devops-embedding is reported unhealthy because it is probed with a generate call, and the ollama/* wildcard is probed with the placeholder model gpt-5-nano.
Proposal
Run Ollama as a StatefulSet with a headless Service, so each pod gets a stable DNS name (ollama-<n>.ollama-nodes). Required pod anti-affinity keeps one pod per GPU node. The architecture affinity, hostPort, node-local hostPath models, and the ollama Service (for Open WebUI, the CLI and pass-through) stay as they are.
In the gateway, give devops-chat, devops-embedding and the Ollama tier of devops-review one deployment per pod, each with max_parallel_requests: 1.
Health checks: mode: embedding for embedding deployments, and a real health_check_model for the wildcard.
A test keeps the per-pod gateway deployments in step with the StatefulSet's replica count.
Acceptance criteria
During a review, gateway requests reach every Ollama node.
/health reports every Ollama deployment healthy.
Open WebUI, devops k8s port-forwards, and host access on port 11434 keep working.
priority/p2-mediumPriority P2: standard workscope/aiAI review pipeline, personas, prompts, LLM client, or RAGscope/k8sKubernetes commands, Helm charts, pods, services, and policiestype/featureType feature: a new function
Activity
feat(k8s): give the gateway one deployment per Ollama node
feat(k8s): give the gateway one deployment per Ollama node (#464)
dan-petty commentedon Sep 23, 2026
Closed by #464, merged into
release/v0.2.23.GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by
devops gh issues close-merged.feat(release): v0.2.23 (#681)