Review: Scale down k8s Ollama to free GPU (r2)
Verdict: APPROVED
Re-review after scope refinement. All three
[BODY] issues from review-1650-2026-06-28 have been fixed. The issue body is now complete, file targets are verified, and acceptance criteria use the correct Terraform-based approach. Two [SCOPE] items remain as non-blocking recommendations.Template Completeness
- [x] Type -- Feature
- [x] Lineage -- Standalone, part of Phase 3 pivot
- [x] Repo -- ldraney/pal-e-platform
- [x] User Story -- well-formed
- [x] Context -- includes Terraform rationale (kubectl would be reverted by tofu apply)
- [x] File Targets -- specific:
terraform/modules/ops/main.tf(helm_release.ollama). Fixed from previous review. - [x] Feature Flag -- "none"
- [x] Acceptance Criteria -- 5 items, all Terraform-based. Fixed from previous review.
- [x] Test Expectations -- 3 items
- [x] Constraints -- 3 items (reversibility, preserve PVCs, no side effects)
- [x] Checklist -- now includes "Tests pass". Fixed from previous review.
- [x] Related -- project and downstream issue referenced
Traceability
- [x] story:gpu-freedom label -- GPU Freedom story
- [x] story note verified --
story-pal-e-world-gpu-freedomexists in pal-e-docs (user-story type, active status) - [ ] story note on project page -- NOT listed in project-pal-e-world user-stories table. [SCOPE] Add gpu-freedom entry to project-pal-e-world user-stories section.
- [x] arch:k3s label -- k3s infrastructure
- [ ] arch note MISSING -- no
arch-k3snote found in pal-e-docs. [SCOPE] Create architecture note arch-k3s for k3s component, or relabel to arch:ollama (consistent with review-1552-2026-06-22-r2). - [x] Forgejo issue -- ldraney/pal-e-platform#486, open
File Targets
- [x]
terraform/modules/ops/main.tf-- VERIFIED. File exists in pal-e-platform repo.helm_release.ollamaresource found at line 47. Contains GPU config (nvidia runtime, gpu.enabled=true, gpu.number=1), model pull (qwen3-embedding:4b), hostPath volume, and depends_on nvidia_device_plugin. Exact match to issue description. - [x] Exclusions correctly scoped -- pal-e-docs code (separate Groq migration issue pal-e-api #283) and Salt states (host Ollama already disabled).
Repo Placement
OK. Issue filed on ldraney/pal-e-platform, file target is in pal-e-platform. Single repo -- no cross-repo issues needed.
Dependencies
- Board item #1653 ("Groq API migration for pal-e-docs embeddings", story:gpu-freedom, 5 pts) depends on THIS ticket completing first. Documented in issue Context and Related sections. Sequencing correct.
- No items in
in_progressthat block this work. - No undocumented blockers detected.
Acceptance Criteria
All 5 AC are now Terraform-based and verifiable (fixed from previous review):
- [x] AC1: "Terraform Helm values set Ollama replicas to 0 (or release disabled via count conditional)" -- verifiable by code review of
helm_release.ollama - [x] AC2: "
tofu planshows the expected change (scale down, not destroy)" -- verifiable by running tofu plan - [x] AC3: "After
tofu apply,nvidia-smishows no Ollama processes" -- verifiable manually - [x] AC4: "pal-e-docs semantic search degrades to keyword-only without crashing" -- verifiable manually
- [x] AC5: "Change is reversible -- can set replicas back to 1 for re-embedding" -- verifiable by code review
Blast Radius
- pal-e-docs semantic search -- acknowledged in issue. Degrades to keyword-only. Covered by AC4.
- Embedding worker (
pal-e-api/k8s/embedding-worker.yaml) -- runs with replicas=1, connects tohttp://ollama.ollama.svc.cluster.local:11434. Will get ConnectError when Ollama scales down. Worker has error handling (marks blocks as errored, continues polling). Will generateembedding_errors_totalPrometheus metrics. Acceptable temporary state before Groq migration (#1653). Not a blocker. - NVIDIA device plugin -- separate Helm release in same module, not affected.
- Salt states --
ollama-service: service.deadalready in place for host systemd. No conflict. - Other ops module resources --
terraform/modules/ops/main.tfalso contains TF state backup CronJob and NVIDIA device plugin. Change is scoped tohelm_release.ollamaonly. Constraints section correctly warns "Must not affect other resources."
Decomposition Assessment
1 file target, 1 repo, 5 acceptance criteria (3 are manual verification, not code changes). Estimated agent work well under 5 minutes. No decomposition needed.
Recommendation
All
[BODY] issues from the previous review are resolved. The issue spec is now complete and implementable. Two [SCOPE] items remain as non-blocking recommendations for traceability hygiene:- [SCOPE] Add
gpu-freedomstory entry to project-pal-e-world user-stories table (story note exists but is not registered on the project page). - [SCOPE] Create architecture note
arch-k3sfor k3s component. Or relabel board item toarch:ollamaif preferred (consistent with prior review review-1552-2026-06-22-r2).
These are parallel documentation tasks that do not block ticket implementation.