From 8e5f831b075d8b5cea9e411c03e11a89fa88f029 Mon Sep 17 00:00:00 2001 From: Rodrigo Fior Kuntzer Date: Mon, 22 Aug 2022 09:51:05 +0200 Subject: [PATCH] fix: fix the verbosity of reconciling logs in the config controller (#4362) Signed-off-by: Rodrigo Fior Kuntzer Signed-off-by: Rodrigo Fior Kuntzer --- pkg/controllers/config/controller.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/controllers/config/controller.go b/pkg/controllers/config/controller.go index c835b0b4ce..2aeec52473 100644 --- a/pkg/controllers/config/controller.go +++ b/pkg/controllers/config/controller.go @@ -45,10 +45,12 @@ func (c *controller) Run(stopCh <-chan struct{}) { } func (c *controller) reconcile(key, namespace, name string) error { - logger.Info("reconciling ...", "key", key, "namespace", namespace, "name", name) + logger := logger.WithValues("key", key, "namespace", namespace, "name", name) if namespace != config.KyvernoNamespace() || name != config.KyvernoConfigMapName() { + logger.V(4).Info("ignoring ...") return nil } + logger.Info("reconciling ...") configMap, err := c.configmapLister.ConfigMaps(namespace).Get(name) if err != nil { if errors.IsNotFound(err) {