From 71479b5577735d25b0acff72d1e65a1597747421 Mon Sep 17 00:00:00 2001 From: Ayodele Abejide Date: Thu, 15 Feb 2024 13:46:32 +0000 Subject: [PATCH] [kube-proxy] add log verbosity to endpoint topology hint loop. We enabled topology hint on one of our services and this log line was emitted ~92 million times in one day from one cluster tripping our log quota for that cluster, as it is the log line cannot be disabled via the `-v` flag because it does not specify verbosity. I think more log locations need to set verbosity at which they are logged, but this one is currently hurting the most. --- pkg/proxy/topology.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/proxy/topology.go b/pkg/proxy/topology.go index 9b75ab40230..faa7ac2e1be 100644 --- a/pkg/proxy/topology.go +++ b/pkg/proxy/topology.go @@ -156,7 +156,7 @@ func canUseTopology(endpoints []Endpoint, svcInfo ServicePort, nodeLabels map[st zone, ok := nodeLabels[v1.LabelTopologyZone] if !ok || zone == "" { - klog.InfoS("Skipping topology aware endpoint filtering since node is missing label", "label", v1.LabelTopologyZone) + klog.V(2).InfoS("Skipping topology aware endpoint filtering since node is missing label", "label", v1.LabelTopologyZone) return false } @@ -166,7 +166,7 @@ func canUseTopology(endpoints []Endpoint, svcInfo ServicePort, nodeLabels map[st continue } if endpoint.ZoneHints().Len() == 0 { - klog.InfoS("Skipping topology aware endpoint filtering since one or more endpoints is missing a zone hint", "endpoint", endpoint) + klog.V(2).InfoS("Skipping topology aware endpoint filtering since one or more endpoints is missing a zone hint", "endpoint", endpoint) return false } @@ -176,7 +176,7 @@ func canUseTopology(endpoints []Endpoint, svcInfo ServicePort, nodeLabels map[st } if !hasEndpointForZone { - klog.InfoS("Skipping topology aware endpoint filtering since no hints were provided for zone", "zone", zone) + klog.V(2).InfoS("Skipping topology aware endpoint filtering since no hints were provided for zone", "zone", zone) return false }