PR #6890 removed the final bits from go-kit/log in the operator code
base but forgot to redirect the klog logs to the new slog logger.
`ResourceReconciler` has a dependency on klog because it uses
`utilruntime.HandleError()` when it fails to sync a resource. As a
consequence, the operator didn't log reconciliation failures anymore.
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* Share parsing for the logging flags across all binaries.
* Refactor and share the web server implementation between the operator
and the admission webhook.
* Refactor controller configuration structs to include only the required
parameters.
* Parse label and field selector arguments early instead of doing it in
each controller.
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
client-go functions can avoid costly logging evaluations by using this
pattern:
```
if klog.V(2).Enabled() { klog.Info("log this") }
```
With this change, the klog verbosity is set to zero (except at debug log
level where it is 6) to ensure that the performance optimization is
preserved.
Signed-off-by: Simon Pasquier <spasquie@redhat.com>