Skip to content

fix(k8s): give the ollama-16gib tier a memory limit - #5117

Merged
dan-petty merged 3 commits into
mainfrom
fix/5115-ollama-16gib-memory-limit
Nov 12, 2026
Merged

dan-petty merged 3 commits into
mainfrom
fix/5115-ollama-16gib-memory-limit

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The ollama container of the ollama-16gib DaemonSet now limits its memory to its 8Gi request. Its node has 16 GiB of memory, of which about 13 GiB is allocatable after the system reservation of dan-petty/homelab pull request 19, and the tier serves nothing. Without a limit, a model load that goes straight to the tier could take all of the free memory of the node. With the limit, the kernel stops the container, not the node. The tier uses 283Mi idle, and ollama-64gib uses 6.4 GiB with its model loaded, so one model load fits. The memory limits of all pods on the node add up to about 10 GiB.

Closes #5115

Change: openspec/changes/archive/2026-11-12-5115-ollama-16gib-memory-limit/

Plan #5115 and add the failing test: the ollama container of
ollama-16gib requests 8Gi of memory and limits it to 8Gi.
The ollama container of ollama-16gib limits its memory to its 8Gi
request. Its node has 16 GiB of memory, about 13 GiB allocatable, and
the tier serves nothing, so a model load past the gateway ends in an OOM
kill of the container, not in a node with no free memory. The general
workload test no longer asserts that the tier has no limit. k8s/README.md
and the Ollama page of the knowledge base state the limit.
@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/k8s Kubernetes commands, Helm charts, pods, services, and policies labels Nov 12, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Local proof (2026-11-12):

  • uv run devops ci fail-to-pass --base origin/main: 1 failed on base, tests.ai.benchmark.test_k8s_llm_gateway.TestK8sLLMGatewayManifests::test_ollama_16gib_tier_limits_its_memory_to_its_request (assert ('8Gi', None) == ('8Gi', '8Gi')); 184 passed on base.
  • uv run devops ci --check --only lint,format,docs,constructs,openspec,test-tree,k8s: all pass.
  • uv run devops ci test tests/ai/test_kb.py tests/review/test_kb_manuals_metadata.py tests/invariants/test_agents_md.py tests/commands/k8s/test_k8s.py tests/ai/benchmark/test_k8s_llm_gateway.py: 240 passed.

No full local devops ci ran. After the merge, Argo CD rolls the DaemonSet ollama-16gib; its pod on the cordoned node restarts with the limit.

@dan-petty
dan-petty marked this pull request as ready for review November 12, 2026 15:38
@dan-petty
dan-petty merged commit 22176a0 into main Nov 12, 2026
23 checks passed
@dan-petty
dan-petty deleted the fix/5115-ollama-16gib-memory-limit branch November 12, 2026 15:40
dan-petty pushed a commit that referenced this pull request Nov 12, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.120.0](v0.119.0...v0.120.0)
(2026-11-12)


### Features

* **agents:** remote agent sessions install the git hooks
([#5126](#5126))
([a04e7a9](a04e7a9))


### Bug Fixes

* **k8s:** give the ollama-16gib tier a memory limit
([#5117](#5117))
([22176a0](22176a0))
* **roadmap:** the Status writer guards an equal label
([#5116](#5116))
([aaf3eaf](aaf3eaf))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/k8s Kubernetes commands, Helm charts, pods, services, and policies type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(k8s): give the ollama-16gib tier a memory limit

1 participant