fix: correct Ollama hostPath volume keys for otwld Helm chart #91
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/pal-e-platform!91
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "89-ollama-hostpath-hotfix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Hotfix for PR #90's volume configuration. The otwld/ollama-helm chart uses
volumes/volumeMounts(notextraVolumes/extraVolumeMounts) andextraEnv(notextraEnvVars). Fixed keys, addedOLLAMA_MODELS=/ollama-modelsto avoid mount path collision with chart's built-in emptyDir at/root/.ollama.Changes
terraform/main.tf: ChangedextraEnvVars→extraEnv,extraVolumes→volumes,extraVolumeMounts→volumeMountsto match otwld/ollama-helm chart values. AddedOLLAMA_MODELS=/ollama-modelsenv var so Ollama uses the hostPath mount instead of the chart's default/root/.ollamaemptyDir.Test Plan
tofu apply -target=helm_release.ollamasucceededqwen3-embedding:4b, 2.4GB) stored at/var/lib/ollama/models/on hostsemantic_searchMCP tool returns results end-to-end after restartReview Checklist
tofu fmtpassestofu validatepassesRelated
plan-pal-e-docs→phase-pal-e-docs-f12-semantic-search-recoveryTofu Plan Output
PR #91 Review
DOMAIN REVIEW
Tech stack: Terraform (Helm provider), Kubernetes (hostPath volumes, env vars), otwld/ollama-helm chart.
This is a targeted hotfix for PR #90, which used incorrect Helm value keys for the otwld/ollama-helm chart. The fix addresses three issues:
Helm value key correction:
extraEnvVars->extraEnv,extraVolumes->volumes,extraVolumeMounts->volumeMounts. These are the correct keys for the otwld/ollama-helm chart (theextra*variants are a Bitnami convention, not otwld).Mount path collision avoidance: The chart creates a built-in emptyDir at
/root/.ollamawhenpersistentVolume.enabled = false. PR #90 mounted the hostPath at/root/.ollama, which would collide with or be masked by the chart's emptyDir. This PR mounts at/ollama-modelsinstead and setsOLLAMA_MODELS=/ollama-modelsso Ollama writes to the hostPath mount.Host path refinement:
/var/lib/ollama->/var/lib/ollama/models-- more specific, avoids mixing model data with any future Ollama host-level state.All three changes are correct and well-reasoned. The volume name change from
ollama-datatoollama-hostpathis a clarity improvement. The comments in the code clearly explain the architecture (chart emptyDir is unused,OLLAMA_MODELSredirects to hostPath mount, models survive any k8s lifecycle event).Helm/k8s specifics:
DirectoryOrCreatetype is appropriate for a hostPath that may not exist on first deploy.nvidia.com/gpu: 1resource request -- it will always land on the same node. This is documented in the header comment above the resource block.extraEnvlist format withname/valueobjects matches the otwld chart's expected schema.No scope creep: The diff touches exactly one file, exactly the Ollama helm release block, and only the keys that were wrong. The embedding worker metrics/alerting resources added in PR #90 are untouched.
BLOCKERS
None.
NITS
/var/lib/ollama/modelsis a reasonable convention, but it is not documented anywhere outside this Terraform file. If the GPU node is ever rebuilt, the operator needs to know this path holds persistent model data. Consider adding it to a recovery SOP or the plan phase notes. Non-blocking -- the inline comment is sufficient for now.SOP COMPLIANCE
89-ollama-hostpath-hotfixreferences issue #89plan-pal-e-docsand phasephase-pal-e-docs-f12-semantic-search-recoveryCloses #89in PR bodytofu fmtandtofu validateconfirmed passingPROCESS OBSERVATIONS
values.yamlfor the actual key names before the initial PR would prevent this class of error. The otwld chart'svalues.yamlis the source of truth for accepted keys.VERDICT: APPROVED