k8s snapshots: mark and reclaim retained PVCs left by a restore
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- go, kubernetes
- Domain
- backend-api-design, cli, documentation, infrastructure
Research direction
Start with the review discussion on PR #3179 and the existing snapshot restore flow; this issue says the API needs a design pass and is blocked until that PR lands. Then read docs/K8S-SNAPSHOT-BACKUPS.md and decide the typed listing and removal API, following the issue’s proto-first and generated-client guidance. Done means retained PVCs can be identified and listed per tenant, removal refuses claims mounted by running pods with a test, and the docs explain retention and reclamation.
Written by the indexing model from the issue text.
Description
Follow-up from the early review of draft PR #3179 (K8s CSI snapshot backups, #3168): https://github.com/FootprintAI/Containarium/pull/3179#pullrequestreview-5711286956. Not blocking that PR; decide and schedule after it lands.
Problem
A snapshot restore creates a new PVC in the source namespace and leaves the previous data claim, and the claim from a failed restore, in place so nothing is lost. Those retained PVCs carry no marker, no cleanup path and no documentation, so storage cost grows without bound with every restore.
Proposal (to be confirmed in the design pass)
- Label or annotate each retained PVC with what it is (previous data claim or failed-restore claim), the box, the snapshot it relates to and when it was retained.
- Add a typed way to list and remove them, CLI-first (a
containariumsubcommand over the generated client, proto-first for any new RPC; no hand-rolled HTTP handler), with an age-out option and a dry-run. - Document the retention behaviour in
docs/K8S-SNAPSHOT-BACKUPS.md.
Open questions (defaults)
- Default age-out for retained PVCs: none, delete only on explicit command (default), or a configurable TTL?
- Should a retained previous claim be removed automatically after a restore has been verified Ready for some interval (default: no)?
Acceptance criteria
- Retained PVCs are identifiable (label or annotation) and listable per tenant, with authorization the same as snapshot Create/Restore/Delete (
AuthorizeTenant). - A removal command refuses to delete a claim still mounted by a running pod, with a test that fails if the check is removed.
- The docs describe what is retained, why and how to reclaim it.
Scope
Design pass needed for the API. Blocked by #3179. Refs #3168, #3179.
🤖 Generated with Claude Code
- Dominant language
- Go
- Stars
- 296
- Forks
- 38
- Avg merge
- 7h 34m
- Merged PRs (30d)
- 631
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from FootprintAI/Containarium
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
FootprintAI/Containarium#2491 ·
Maintainers usually reply within 1 day
-
needs-decision security size:M
Difficulty 5/5 Over a week Newbie friendliness 15/100
FootprintAI/Containarium#3365 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 Half a day Newbie friendliness 55/100
FootprintAI/Containarium#3361 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 25/100
FootprintAI/Containarium#3360 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement model:sonnet phase-1-flow runtime:claude size:S
Difficulty 3/5 1-2 days Newbie friendliness 30/100
FootprintAI/Containarium#3358 ·
Maintainers usually reply within 1 day
All issues in FootprintAI/Containarium
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 2 days
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
kagent-dev/kagent#3462 ·
Maintainers usually reply within 1 day
-
netrc credential source accepts a password with an embedded CR/LF that every other source rejectsOpenagent-butler-finding bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
jordansmall/spindrift#6268 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 7 days