linode: ephemeral StorageClass uses Delete reclaim, not Retain - #1313
Conversation
Follow-up to #1311. The tagged StorageClass kept the LKE default's Retain reclaim policy, so on a live cluster every churned/deleted PVC (StatefulSet reschedule, operator recreation) leaves its Block Storage volume behind as a Released PV that bills until the cluster is torn down. Observed on a live HA cluster: 35 of 54 PVs Released, 830 GB parked. Flip the ephemeral cluster's StorageClass to reclaimPolicy: Delete so a deleted PVC frees its volume immediately while the CSI controller is alive. The tag-based sweep still reaps whatever survives an abrupt cluster-delete (volumes are tagged at birth via volumeTags); Delete only removes the within-life Released buildup. The StorageClass name is unchanged so charts referencing it still resolve. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DBhvZuEUQU8ym347Xat4Yy
|
Lint ( |
|
Warning Review limit reachedNext included review available in 56 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
WalkthroughThe LKE provisioning script changes the Merge Risk: 🔵 Low · up to The StorageClass will delete volumes for deleted PVCs as intended, but its explanatory comment incorrectly describes the default reclaim policy and should be corrected before merge. 🚥 Pre-merge checks | ✅ 2 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (2 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Team
Run ID: 67b121b3-4fca-4caf-88e8-044ccdbad503
📒 Files selected for processing (1)
.claude/skills/linode-ha-provisioning/scripts/create-lke-pmm-ha.sh
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
percona/pmm-qa(manual)percona/pmm(manual)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DBhvZuEUQU8ym347Xat4Yy
Problem
Follow-up to #1311. The tagged StorageClass that
create-lkeinstalls kept LKE's default Retain reclaim policy. On a live cluster, every churned or deleted PVC (a StatefulSet reschedule, an operator recreating a claim) then leaves its Block Storage volume behind as a Released PV that keeps billing until the whole cluster is torn down.Observed on a live HA cluster (
pmm-ha-PMM-15304-ha): 35 of 54 PVs Released, 830 GB parked. These are not a cross-cluster leak — they carry the live cluster'spmm-qa-runtag, so the orphan sweep correctly keeps them and will reap them when the cluster dies — but they waste money for the cluster's whole life (up to its 24–48 h TTL).Change
One line: the ephemeral StorageClass now uses
reclaimPolicy: Deleteinstead ofRetain. A deleted PVC frees its volume immediately, while the CSI controller is alive — no Released buildup during the cluster's life.Teardown safety is unchanged: an abrupt
lke cluster-deletestill can't run the CSI controller, but volumes are tagged at birth (volumeTags, #1311) soprune-lke-orphans.shreaps whatever survives.Deleteonly removes the within-life Released accumulation. The StorageClass name is kept so charts referencing it still resolve.This is intentionally not the race-hardening from the closed #1312 (that concern was judged not worth the change) — only the reclaim-policy flip.
Validation
shellcheck -S warningandbash -nclean.Deleteis the standard reclaim policy for throwaway storage and removes that buildup at the source.🤖 Generated with Claude Code
https://claude.ai/code/session_01DBhvZuEUQU8ym347Xat4Yy
Generated by Claude Code