kube-scheduler: downgrade namespace log message from "error" to "info"

GetNamespaceLabelsSnapshot has a fallback when it gets errors when looking up a
namespace, therefore reporting the error is more informational than a real
error. In particular, not finding the namespace is normal when running
test/integration/scheduler_perf and happens so frequently that there is a lot
of output on stderr:

E0120 12:19:09.204768   95305 plugin.go:138] "getting namespace, assuming empty set of namespace labels" err="namespace \"namespace-1\" not found" namespace="namespace-1"
This commit is contained in:
Patrick Ohly 2022-01-20 12:00:20 +01:00
parent dbb5e3fe86
commit 1f341ee7b5

View File

@ -135,6 +135,6 @@ func GetNamespaceLabelsSnapshot(ns string, nsLister listersv1.NamespaceLister) (
// Create and return snapshot of the labels.
return labels.Merge(podNS.Labels, nil)
}
klog.ErrorS(err, "getting namespace, assuming empty set of namespace labels", "namespace", ns)
klog.V(3).InfoS("getting namespace, assuming empty set of namespace labels", "namespace", ns, "err", err)
return
}