What problem are you facing?
When a Managed Resource is marked for deletion the Managed Reconciler immediately calls the external.Delete() method to trigger deletion of the external managed resource. This makes it impossible to perform any "pre-delete" actions such as taking a database backup before the resource has been deleted.
A common pattern in kubernetes is for controllers that have an interest in a resource they don't manage to place a finalizer on the resource so that they can be notified when the resource is deleted and perform some processing before the resource is garbage collected. This works for native and "local" kubernetes resources that do not have external manifestations to consider as the important data is in the CR instance.
This pattern does not work for Crossplane MRs because the reconciler does not consider the existence of other finalizers before deleting the remote resource.
How could Crossplane help solve your problem?
Crossplane could allow a similar pattern by delaying the call to external.Delete() until there are no finalizers on the MR other than the one Crossplane uses. This would allow scenarios such as Operation Functions that want to perform some action prior to the external resource being deleted.
What problem are you facing?
When a Managed Resource is marked for deletion the Managed Reconciler immediately calls the external.Delete() method to trigger deletion of the external managed resource. This makes it impossible to perform any "pre-delete" actions such as taking a database backup before the resource has been deleted.
A common pattern in kubernetes is for controllers that have an interest in a resource they don't manage to place a finalizer on the resource so that they can be notified when the resource is deleted and perform some processing before the resource is garbage collected. This works for native and "local" kubernetes resources that do not have external manifestations to consider as the important data is in the CR instance.
This pattern does not work for Crossplane MRs because the reconciler does not consider the existence of other finalizers before deleting the remote resource.
How could Crossplane help solve your problem?
Crossplane could allow a similar pattern by delaying the call to external.Delete() until there are no finalizers on the MR other than the one Crossplane uses. This would allow scenarios such as
Operation Functionsthat want to perform some action prior to the external resource being deleted.