1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-28 02:18:15 +00:00

fix: reduce webhook controller logs (#4897)

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
Charles-Edouard Brétéché 2022-10-12 10:39:27 +02:00 committed by GitHub
parent c213deab4b
commit 8e15982448
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -143,8 +143,8 @@ func NewController(
config.ValidatingWebhookConfigurationName: sets.NewString(),
},
}
controllerutils.AddDefaultEventHandlers(logger, mwcInformer.Informer(), queue)
controllerutils.AddDefaultEventHandlers(logger, vwcInformer.Informer(), queue)
controllerutils.AddDefaultEventHandlers(logger.V(3), mwcInformer.Informer(), queue)
controllerutils.AddDefaultEventHandlers(logger.V(3), vwcInformer.Informer(), queue)
controllerutils.AddEventHandlersT(
secretInformer.Informer(),
func(obj *corev1.Secret) {
@ -200,7 +200,7 @@ func (c *controller) Run(ctx context.Context, workers int) {
// add our known webhooks to the queue
c.enqueueAll()
go c.watchdog(ctx)
controllerutils.Run(ctx, ControllerName, logger, c.queue, workers, maxRetries, c.reconcile)
controllerutils.Run(ctx, ControllerName, logger.V(3), c.queue, workers, maxRetries, c.reconcile)
}
func (c *controller) watchdog(ctx context.Context) {