Description
We need to settle how we configure which namespace(s) a controller targets and how we configure this. Right now, there are conflicting versions, in particular when it comes to interpreting what no passed namespaces means. ControllerConfiguration
assumes that the current namespace is the target if the controller doesn't specify any, using the WATCH_ALL_NAMESPACES_MARKER
to decide whether the controller watches all namespaces, while other parts of the code assume that if target namespaces is empty then that means that the controller should watch all namespaces.
That historic behavior is problematic, in my opinion, because the default behavior for a controller should be to watch the namespace it is deployed on as it might not have privileges outside of that particular namespace.
We should also remove all the register
methods on Operator
apart from this one which uses the controller's configuration to appropriately register the controller accordingly.