Woodpecker: expose bundle-cache PVC volume to pipeline pods #418
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
ldraney/pal-e-platform!418
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "woodpecker-bundle-cache-volume"
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
One-line Terraform change to expose the
woodpecker-bundle-cachePVC to Woodpecker pipeline pods, enabling persistent gem caching for landscaping-assistant CI builds.Closes #417
Changes
WOODPECKER_BACKEND_K8S_VOLUMESenv var to the Woodpecker agent config. Maps thebundle-cachevolume name (referenced in landscaping-assistant's.woodpecker.yaml) to thewoodpecker-bundle-cachePVC (already created in cluster).Test Plan
terraform planshows only the agent env var additionterraform applyrolls the agent pod with the new config/cache/bundleon first runReview Checklist
Related Notes
.woodpecker.yamlkubectl apply(not yet Terraform-managed)PR #418 Review
DOMAIN REVIEW
Tech stack: Terraform / Helm / Kubernetes
JSON escaping correctness: Verified. The HCL string
"[{\\\"name\\\":\\\"bundle-cache\\\",\\\"persistentVolumeClaim\\\":{\\\"claimName\\\":\\\"woodpecker-bundle-cache\\\"}}]"correctly unescapes through two layers:\\\"->\"(literal backslash-quote in the string value)[{"name":"bundle-cache","persistentVolumeClaim":{"claimName":"woodpecker-bundle-cache"}}]This produces valid Kubernetes volume JSON.
Volume name cross-reference: Confirmed.
landscaping-assistantPR #188 (merged) addedbackend_options.kubernetes.volumeMountswithname: bundle-cacheandmountPath: /cache/bundleto.woodpecker.yaml. The volume namebundle-cachein this PR matches exactly.PVC claim name cross-reference: Confirmed. PR #188's inline comments specify the PVC as
woodpecker-bundle-cachein thewoodpeckernamespace, which matchesclaimNamehere.ReadWriteOnce access mode: Appropriate. The PR body notes single-agent setup. With
WOODPECKER_MAX_WORKFLOWS = "4"visible in the surrounding config, concurrent steps could attempt simultaneous access. However, RWO permits multiple pods on the same node, and Woodpecker agent pods schedule to the same node in this setup. If the agent is ever scaled to multiple replicas on different nodes, this would need to become ReadWriteMany or use per-node caching -- but that is a future concern, not a current blocker. PR #405 already scaled agents to 2 replicas, so this is worth monitoring.PVC not Terraform-managed: The PR body notes "PVC created via
kubectl apply(not yet Terraform-managed)". This is an infrastructure drift risk -- the PVC exists outside Terraform state, soterraform destroyor namespace cleanup would not account for it. Not a blocker for this PR, but should be tracked as follow-up work.BLOCKERS
None.
NITS
PVC outside Terraform state: Consider a follow-up ticket to import the
woodpecker-bundle-cachePVC into Terraform as akubernetes_persistent_volume_claimresource. Having infra declared in two places (Terraform + manual kubectl) creates drift risk.Multi-agent RWO concern: PR #405 scaled Woodpecker agents to 2 replicas. If those replicas land on different nodes, the RWO PVC will fail to mount on the second node. Worth a comment in the code or a monitoring note. Current risk is low if both agents schedule to the same node.
Alignment: The existing env vars use padded alignment for readability. The new line follows this convention correctly -- no issue here.
SOP COMPLIANCE
Closes #417present in bodyPROCESS OBSERVATIONS
bundle-cachevolume references are unaffected. Only landscaping-assistant's.woodpecker.yamlreferences this volume name.2>/dev/null || true), so ordering is safe -- this PR can land independently..woodpecker.yamlcomments in the other repo. A brief note in pal-e-platform docs about CI volume provisioning would help future operators.VERDICT: APPROVED