mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
kube-proxy use debug log level for cache operations
Level 4 is mean for debug operations. The default level use to be level 2, on clusters with a lot of Services this means that the kube-proxy will generate a lot of noise on the logs, with the performance penalty associated to it.
This commit is contained in:
parent
c7d47e4c94
commit
b84a5faaae
@ -322,7 +322,7 @@ func (sct *ServiceChangeTracker) Update(previous, current *v1.Service) bool {
|
|||||||
if reflect.DeepEqual(change.previous, change.current) {
|
if reflect.DeepEqual(change.previous, change.current) {
|
||||||
delete(sct.items, namespacedName)
|
delete(sct.items, namespacedName)
|
||||||
} else {
|
} else {
|
||||||
klog.V(2).InfoS("Service updated ports", "service", klog.KObj(svc), "portCount", len(change.current))
|
klog.V(4).InfoS("Service updated ports", "service", klog.KObj(svc), "portCount", len(change.current))
|
||||||
}
|
}
|
||||||
metrics.ServiceChangesPending.Set(float64(len(sct.items)))
|
metrics.ServiceChangesPending.Set(float64(len(sct.items)))
|
||||||
return len(sct.items) > 0
|
return len(sct.items) > 0
|
||||||
@ -438,9 +438,9 @@ func (sm *ServiceMap) merge(other ServiceMap) sets.String {
|
|||||||
existingPorts.Insert(svcPortName.String())
|
existingPorts.Insert(svcPortName.String())
|
||||||
_, exists := (*sm)[svcPortName]
|
_, exists := (*sm)[svcPortName]
|
||||||
if !exists {
|
if !exists {
|
||||||
klog.V(1).InfoS("Adding new service port", "portName", svcPortName, "servicePort", info)
|
klog.V(4).InfoS("Adding new service port", "portName", svcPortName, "servicePort", info)
|
||||||
} else {
|
} else {
|
||||||
klog.V(1).InfoS("Updating existing service port", "portName", svcPortName, "servicePort", info)
|
klog.V(4).InfoS("Updating existing service port", "portName", svcPortName, "servicePort", info)
|
||||||
}
|
}
|
||||||
(*sm)[svcPortName] = info
|
(*sm)[svcPortName] = info
|
||||||
}
|
}
|
||||||
@ -463,7 +463,7 @@ func (sm *ServiceMap) unmerge(other ServiceMap, UDPStaleClusterIP sets.String) {
|
|||||||
for svcPortName := range other {
|
for svcPortName := range other {
|
||||||
info, exists := (*sm)[svcPortName]
|
info, exists := (*sm)[svcPortName]
|
||||||
if exists {
|
if exists {
|
||||||
klog.V(1).InfoS("Removing service port", "portName", svcPortName)
|
klog.V(4).InfoS("Removing service port", "portName", svcPortName)
|
||||||
if info.Protocol() == v1.ProtocolUDP {
|
if info.Protocol() == v1.ProtocolUDP {
|
||||||
UDPStaleClusterIP.Insert(info.ClusterIP().String())
|
UDPStaleClusterIP.Insert(info.ClusterIP().String())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user