1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-31 03:45:17 +00:00

fix: reduce logs in controllers when an item is not found ()

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
Charles-Edouard Brétéché 2024-01-25 00:12:15 +01:00 committed by GitHub
parent b7eea2faa9
commit bc2c50058a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -109,7 +109,7 @@ func handleErr(ctx context.Context, logger logr.Logger, metric *controllerMetric
if err == nil {
queue.Forget(obj)
} else if errors.IsNotFound(err) {
logger.Info("Dropping request from the queue", "obj", obj, "error", err.Error())
logger.V(4).Info("Dropping request from the queue", "obj", obj, "error", err.Error())
queue.Forget(obj)
} else if queue.NumRequeues(obj) < maxRetries {
logger.Info("Retrying request", "obj", obj, "error", err.Error())