Review: Scale down k8s Ollama to free GPU
Verdict: NEEDS_REFINEMENT
Template Completeness
- [x] Type -- Feature
- [x] Lineage
- [x] Repo
- [x] User Story
- [x] Context
- [ ] File Targets -- present but vague, no specific file path
- [x] Feature Flag -- "none"
- [x] Acceptance Criteria -- 3 items
- [x] Test Expectations -- 2 items
- [x] Constraints
- [ ] Checklist -- missing "Tests pass" item from template
- [x] Related
Traceability
- [x] story:gpu-freedom label -- GPU Freedom story
- [ ] story note on project page -- story note
story-pal-e-world-gpu-freedomEXISTS in pal-e-docs but is NOT listed in the 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. Alternatively, consider whetherarch:ollamais a more accurate label (prior review review-1552-2026-06-22-r2 used arch:ollama for similar Ollama work). - [x] Forgejo issue -- ldraney/pal-e-platform#486, open
File Targets
- [ ] "K8s Ollama deployment manifest" -- ISSUE: Not a specific file path. The actual Ollama deployment is a Terraform Helm release at
terraform/modules/ops/main.tf(resourcehelm_release.ollama). The file target must specify this path. - [x] "pal-e-docs code -- separate Groq migration issue" -- correctly scoped out
Repo Placement
OK. The Ollama Helm release is managed in
ldraney/pal-e-platform at terraform/modules/ops/main.tf. Repo assignment is correct. Single repo -- no cross-repo issues needed.Dependencies
- Board item #1653 ("Groq API migration for pal-e-docs embeddings", story:gpu-freedom) depends on THIS ticket completing first. The issue Context section acknowledges this: "Groq API replaces Ollama for LLM inference." Sequencing is correct.
- No items currently in
in_progressthat block this work. - Dependencies are implicitly documented in Context but not explicitly listed.
Acceptance Criteria
ISSUE: The AC reference
kubectl scale deployment -n ollama --replicas=0 as the mechanism. However, the Ollama deployment is Terraform-managed via helm_release.ollama. A manual kubectl scale would be reverted on the next tofu apply. The AC should describe the Terraform-based approach:- Option A: Set
replicas = 0in the Helm values withinhelm_release.ollama - Option B: Add an
ollama_enabledvariable that conditionally includes the Helm release - Option C: Add a
count = 0on thehelm_release.ollamaresource
The AC for
nvidia-smi and graceful degradation are verifiable.Blast Radius
- pal-e-docs semantic search -- acknowledged in the issue. Degrades to keyword-only. The
project-pal-e-docspage confirms semantic search depends on Ollama (qwen3-embedding:4b). Graceful degradation claim should be verified. - NVIDIA device plugin -- separate Helm release in same module, not affected by Ollama scale-down.
- Salt services state --
salt/states/services/init.slsalready hasollama-service: service.dead(host systemd Ollama disabled). No conflict. - Embedding worker -- if an embedding worker pod exists that connects to Ollama, it would fail on embedding requests. Issue does not address this -- needs AC for embedding worker behavior.
Decomposition Assessment
1 file target, 3 acceptance criteria, estimated agent work under 5 minutes. No decomposition needed.
Recommendation
- [BODY] Fix file target: replace "K8s Ollama deployment manifest" with
terraform/modules/ops/main.tf(resourcehelm_release.ollama). Specify the approach: setreplicas = 0in Helm values or addcount = var.ollama_enabled ? 1 : 0. - [BODY] Fix AC #1: replace
kubectl scalewith Terraform-based verification (e.g., "tofu applysucceeds with Ollama scaled to 0" or "kubectl get deployment -n ollamashows 0/0 replicas after apply"). - [BODY] Add "Tests pass" to Checklist section per template.
- [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 toarch:ollamaif preferred (consistent with prior review review-1552-2026-06-22-r2).