Skip to content

feat: Pvc auto deletion logic#1514

Open
Alexj9837 wants to merge 2 commits intomainfrom
pvc-auto-deletion-logic
Open

feat: Pvc auto deletion logic#1514
Alexj9837 wants to merge 2 commits intomainfrom
pvc-auto-deletion-logic

Conversation

@Alexj9837
Copy link
Copy Markdown

Adds a new autodeletion cronjob that automattically deletes stale PVSs based on the last-used annotation, written by the time-stamper cronjob.

how it works:

  • Deletion bash script iterates over all the PVCs
  • If a PVC has a last-used older than 3 months it gets deleted
  • Unless it has the annotation of protected = true

@Alexj9837 Alexj9837 changed the title Pvc auto deletion logic feat: Pvc auto deletion logic Apr 24, 2026
@Alexj9837 Alexj9837 force-pushed the pvc-auto-deletion-logic branch from 61215cd to 3e8f562 Compare April 24, 2026 15:15
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.34%. Comparing base (65b7e75) to head (db3dc7a).
⚠️ Report is 34 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1514      +/-   ##
==========================================
+ Coverage   95.21%   95.34%   +0.13%     
==========================================
  Files          43       43              
  Lines        3132     3200      +68     
==========================================
+ Hits         2982     3051      +69     
+ Misses        150      149       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Alexj9837 Alexj9837 force-pushed the pvc-auto-deletion-logic branch 6 times, most recently from cf12235 to 2e8363a Compare April 29, 2026 14:55
Alexj9837 and others added 2 commits May 1, 2026 09:37
merging personal branch to a new branch.

Add conditional cronjob and increase backoff limit

Refactor time-stamper.sh script inclusion in ConfigMap

Time stamper cron (#1479)

Change chart version from 1.13.0 to 0.1.0

removing not fit for purpose test

Update time-stamper.sh

removing the logic for if the pvc wasn't mounted. now only annotates mounted pvcs.

Base logic for pvc auto deletion

Sorting out the weekly cronjob for pvc auto deletion, also adding someting to value yaml to turn it off

Added Del perm

del s

changing name to be more readable

fix: if there isn't a last_used check if not null

Fix for time-stamper.sh as it was annotating all PVCs

pvc deletion test fix

removing test yaml

added affinity and tolerations to cronjobs

added an affinity to the cronjob.
@Alexj9837 Alexj9837 force-pushed the pvc-auto-deletion-logic branch from 60f84a1 to db3dc7a Compare May 1, 2026 09:38
@Alexj9837 Alexj9837 requested a review from dan-fernandes May 1, 2026 09:39
@Alexj9837 Alexj9837 marked this pull request as ready for review May 1, 2026 09:44
@Alexj9837 Alexj9837 requested a review from a team as a code owner May 1, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant