Description
Feature Request
Is your feature request related to a problem? Please describe.
See #3108 and corresponding discussion:
https://kubernetes.slack.com/archives/C0181L6JYQ2/p1704293361617039
With various performance improvements, the test case in #3108 started to fail more frequently, as the Subscription would re-create the CSV faster, subsequently blocking the CR/CRBs from being deleted, and thus causing the test to fail.
However, finalizers are not used (in general) for cleanup, and should be added.
Describe the solution you'd like
Add finalizers for appropriate deletion actions.
CSV Finalizer
For instance, the CSV needs a finalizer to cleanup CRs/CRBs.
Example Scenario:
- do all the normal setup
- scale the controller down to 0 replicas
- delete the CSV
- scale the controller up to 1 replicas
No cleanup will occur.
Other finalizers may also be necessary, but we want to ensure these are resolved.