Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Content resources cleanup #2464

Open
2 tasks done
weyfonk opened this issue May 28, 2024 · 1 comment
Open
2 tasks done

Improve Content resources cleanup #2464

weyfonk opened this issue May 28, 2024 · 1 comment

Comments

@weyfonk
Copy link
Contributor

weyfonk commented May 28, 2024

This is a follow-up to #1980.

With finalizers in place for bundle deployments, we have one additional reconcile loop available to run cleanup tasks when a bundle deployment is deleted.
This opportunity could be used to act on Content resources, preventing their batch deletion by our cleanup controller.

Possible approaches to baking this logic into the bundle deployment reconciler:
A. When deleting a bundle deployment, check referenced Content resources and, for each Content resources, check how many bundle deployments reference it (might be expensive/cumbersome): if no other bundle deployment than the one we are deleting references it anymore, then the Content resource is safe to delete. We could increase timer for the content purge logic, or make it configurable, since garbage collection now happens as needed.
* This approach would be backwards compatible

B. Add finalizers to Content resources, eg. one per bundle deployment referencing it? A given finalizer would be deleted when the bundle deployment it refers to is itself deleted. These finalizers could act as reference counts, enabling a Content resource to be deleted as soon as its finalizers have all been deleted.

  • Implement new Content resources cleanup logic
  • Remove Content purge logic linked above
@manno
Copy link
Member

manno commented Jul 3, 2024

Moving to the next milestone, because of the ongoing code freezes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 👀 In review
Development

No branches or pull requests

2 participants