Open andreacv98 opened 5 months ago
I found that the specific behavior that I found in the log (first reconcile over a solver in the right namespace, than it is changed in the second iteration) can be caused by the mapping over the watches set for the reconcile of the rear-manager.
Starting from this point:
The code refers (concerning the discovery issue, but I think it can be extended to other resources watched by the reconciler):
Here, the namespace of the mapping is hard coded to the one of fluidos.
Hello everyone,
With this issue, I want to raise a question: should the operators watch for CR created in every namespace?
This doubt comes from a bug: when you create a solver in the default namespace for example, instead of the fluidos namespace, the process is interrupted after the successful discovery creation and completion.
Looking inside the log of the rear-manager you can see the following:
As you can see the solver-controller first correctly reconcile the solver created in the default namespace, but after the discovery creation, the subsequent reconciliation is performed over the original solver, but in the default fluidos namespace.
Moreover, looking inside the helm chart, the RBAC for the rear-manager are cluster wide (ClusterRole, ClusterRoleBinding, etc.).
In conclusion, I can see both an intention of watching for solver resources cluster wide and in the specific namespace, but I don't understand which one has been chosen. In my opinion, the controller can be forced to watch for only the solver resources inside the fluidos namespace, granting a better control and more specific RBAC.
Feel free to give me any feedback about this point
Thanks, Andrea