Allow hostPath volumes for Woodpecker CI bundle caching #406
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!406
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-woodpecker-hostpath-allow"
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
Adds
WOODPECKER_BACKEND_K8S_VOLUME_HOSTPATH_ALLOW = "/var/lib/woodpecker-cache"to the Woodpecker agent env. Pipeline #191 on landscaping-assistant failed because the k8s backend silently dropped the hostPath volume mount — this unblocks the bundle caching from PR #81.Changes
terraform/modules/ci/main.tf— one env var added to agent config, scoped to/var/lib/woodpecker-cacheTest Plan
tofu planshows only the agent env changesave-bundle-cachestep succeedsrestore-bundle-cachestepReview Checklist
/var/lib/woodpecker-cacheallowedRelated Notes
Follow-up to PR #405 (agent scaling). Fixes landscaping-assistant pipeline #191.
Closes ldraney/landscaping-assistant#60
PR #406 Review
DOMAIN REVIEW
Tech Stack: Terraform (Helm release values for Woodpecker CI on Kubernetes)
Change Analysis:
This PR adds a single environment variable
WOODPECKER_BACKEND_K8S_VOLUME_HOSTPATH_ALLOW = "/var/lib/woodpecker-cache"to the Woodpecker agent configuration interraform/modules/ci/main.tf. The remaining diff is whitespace realignment for column consistency.Terraform/k8s Assessment:
Correctness: The env var is the documented Woodpecker mechanism to allowlist hostPath volumes in the k8s backend. Without it, the backend silently drops hostPath mounts -- which is exactly what pipeline #191 experienced. The fix is correct.
Security (hostPath scope): The path is narrowly scoped to
/var/lib/woodpecker-cache-- this is appropriate for a build cache. HostPath volumes are a known security surface in k8s, but scoping to a single purpose-built directory (not/,/etc, or/var/run) is the accepted pattern for CI caching. No escalation risk.State safety: This is a Helm values change (env var addition). It will trigger a Helm release update on
tofu applybut does not modify Terraform state structure. No migration plan needed.tofu fmtcompliance: The alignment reformatting uses consistent padding. The new key is the longest, and all values are column-aligned. Acceptable.Blast radius: Single env var addition to one resource. Minimal.
Correlation with consumer: Verified against
/home/ldraney/landscaping-assistant/.woodpecker.yaml-- the pipeline useshost_path.path: /var/lib/woodpecker-cache/bundlewhich falls under the allowed prefix/var/lib/woodpecker-cache. The allow path correctly covers subpaths.BLOCKERS
None.
NITS
Branch naming: Branch is
fix-woodpecker-hostpath-allow-- since this closes a cross-repo issue (landscaping-assistant#60), the convention{issue-number}-{purpose}is loosely applicable. A name like60-woodpecker-hostpath-allowwould be stricter, but cross-repo references make this a grey area. Non-blocking.Test plan checkbox format: The test plan uses
- [ ](unchecked) items. Consider checking them off or noting they will be validated post-merge. Non-blocking.SOP COMPLIANCE
set_sensitiveblocks)PROCESS OBSERVATIONS
VERDICT: APPROVED