Description of problem: At startup the MCE logs an error like the following
2023-04-28T13:40:23Z ERROR setup Failed to get deployment {"error": "the cache is not started, can not read objects"}
main.ensureWebhooks.func1
/workspace/main.go:352
This is because it tries to use the manager's client to query the Kube api before the cache has started. This will always happen because the call happens before the manager is started. It is only on subsequent calls after the manager starts that the webhook is successfully set up.
Version-Release number of selected component (if applicable): 2.8.0
How reproducible: Always
Steps to Reproduce: See above description
Actual results: Error during startup due to using controller's manager's client prematurely
Expected results: Webhook setup should happen before the manager starts.
Additional info:
We should use the uncached client to configure the webhook before the manager starts and the operator condition is ready.