DELETE events instead of using a Finalizer
The following discussion from webEOS-config-controller!16 should be addressed:
-
@alossent started a discussion: // WebEosSite doesn't exist --> TODO: Remove the site configuration
Should be like for secondary resources.
Finalizer will not be appropriate here because this is not an operator, this controller does not own the resource. Also we need each instance of the config controller (we have one per webeos pod) to clean up its local site configuration, and each instance is also ephemeral. All that won't work well with a finalizer.
Instead we can rely on DELETE events. They are not as reliable as finalizer, but it's not a very big deal if we leave one behind on occasion: when the WebeosSite resource is removed, the webeos site operator will remove the route exposing it so the site won't receive any request.