Skip to content

feat(crossplane): add S3 lifecycle policy for backup retention#7760

Merged
h0lybyte merged 1 commit intodevfrom
trunk/s3-lifecycle-policy-1772928013
Mar 8, 2026
Merged

feat(crossplane): add S3 lifecycle policy for backup retention#7760
h0lybyte merged 1 commit intodevfrom
trunk/s3-lifecycle-policy-1772928013

Conversation

@h0lybyte
Copy link
Member

@h0lybyte h0lybyte commented Mar 8, 2026

Summary

  • Adds a Crossplane BucketLifecycleConfiguration for the kilobase S3 bucket as a belt-and-suspenders safety net alongside barman's retention policy
  • WAL files expire after 14 days (barman cleans at 7d)
  • Base backups expire after 30 days (barman cleans at 7d)
  • Incomplete multipart uploads aborted after 3 days

Context

If CNPG/barman cleanup stops working (e.g., cert expiry, operator crash), S3 will still expire old objects and prevent unbounded storage growth. This complements PR #7757 which fixed the backup schedule and added WAL retention.

Test plan

  • Verify ArgoCD syncs the BucketLifecycleConfiguration resource
  • Confirm lifecycle rules appear in AWS S3 console for the kilobase bucket
  • Verify existing backups are not immediately affected (14d/30d thresholds)

Crossplane-managed BucketLifecycleConfiguration as a safety net
for the kilobase backup bucket. Expires WAL files after 14 days
and base backups after 30 days at the S3 level, independent of
barman's 7-day retention. Also cleans up incomplete multipart
uploads after 3 days.
@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@h0lybyte h0lybyte merged commit 58adb48 into dev Mar 8, 2026
5 checks passed
@h0lybyte h0lybyte deleted the trunk/s3-lifecycle-policy-1772928013 branch March 8, 2026 00:28
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