Delete existing resources with a nonzero metadata.deletionTimestamp
The following discussion from webEOS-config-controller!16 should be addressed:
-
@alossent started a discussion: In line with https://gitlab.cern.ch/webservices/webeos/webEOS-config-controller/merge_requests/16/diffs#note_3277471:
A finalizer is not really a solution here. Instead, rely on DELETE events to run the reconcile loop when the webeeossite resource is deleted. I think DELETE events are processed by default by the SDK, so there is nothing special to do.
When a Kubernetes resource is deleted, it can be in 2 states:
- actually deleted. This is caught at the beginning of the reconcile loop (see https://gitlab.cern.ch/webservices/webeos/webEOS-config-controller/merge_requests/16/diffs#note_3277471)
-
deleting: the resource still exists, but has a nonzero
metadata.deletionTimestamp
So here, instead of a finalizer I suggest something like:
// TODO: If `metadata.deletionTimestamp` is nonzero, Remove the site configuration