-
Task
-
Resolution: Won't Do
-
Normal
-
None
-
OSSM 2.5.2
-
None
On startup, the operator creates several webhook resources. This code has several issues:
- It instantiates its own kube client instead of reusing the one supplied by the controller Manager.
- This new client performs a large number of unnecessary API discovery calls (100+), which wouldn't be necessary if the existing kube client was used.
- The code creates these resources during startup instead of doing it in a controller. If anyone deletes any of these resources, the operator doesn't recreate them until the operator is restarted.
We should move the creation of these resources into a controller. This will solve all these issues.