Migrate cmd/proxy/app and pkg/proxy/meta_proxier to structured logging (#104928)

* migrate log

Signed-off-by: jyz0309 <45495947@qq.com>

* remove useless change

Signed-off-by: jyz0309 <45495947@qq.com>

fix comment

Signed-off-by: jyz0309 <45495947@qq.com>

fix comment

Signed-off-by: jyz0309 <45495947@qq.com>

* use nil to instead err

Signed-off-by: jyz0309 <45495947@qq.com>

* fix comment

Signed-off-by: jyz0309 <45495947@qq.com>

* remove useless change

Signed-off-by: jyz0309 <45495947@qq.com>

* resolve conflict

Signed-off-by: jyz0309 <45495947@qq.com>

* resolve conflict

Signed-off-by: jyz0309 <45495947@qq.com>

* fix comment

Signed-off-by: jyz0309 <45495947@qq.com>

* fix comment

Signed-off-by: jyz0309 <45495947@qq.com>

* fix comment

Signed-off-by: jyz0309 <45495947@qq.com>
This commit is contained in:
Alkaid 2021-09-15 11:50:40 +08:00 committed by GitHub
parent 4622007bdd
commit 5449ce7c5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -203,9 +203,9 @@ func newProxyServer(
}
}
if dualStack {
klog.V(0).Infof("kube-proxy running in dual-stack mode, %s-primary", iptInterface.Protocol())
klog.V(0).InfoS("kube-proxy running in dual-stack mode", "ipFamily", iptInterface.Protocol())
} else {
klog.V(0).Infof("kube-proxy running in single-stack %s mode", iptInterface.Protocol())
klog.V(0).InfoS("kube-proxy running in single-stack mode", "ipFamily", iptInterface.Protocol())
}
if proxyMode == proxyModeIPTables {

View File

@ -94,7 +94,7 @@ func (proxier *metaProxier) OnEndpointSliceAdd(endpointSlice *discovery.Endpoint
case discovery.AddressTypeIPv6:
proxier.ipv6Proxier.OnEndpointSliceAdd(endpointSlice)
default:
klog.V(4).Infof("EndpointSlice address type not supported by kube-proxy: %s", endpointSlice.AddressType)
klog.ErrorS(nil, "EndpointSlice address type not supported", "addressType", endpointSlice.AddressType)
}
}
@ -107,7 +107,7 @@ func (proxier *metaProxier) OnEndpointSliceUpdate(oldEndpointSlice, newEndpointS
case discovery.AddressTypeIPv6:
proxier.ipv6Proxier.OnEndpointSliceUpdate(oldEndpointSlice, newEndpointSlice)
default:
klog.V(4).Infof("EndpointSlice address type not supported by kube-proxy: %s", newEndpointSlice.AddressType)
klog.ErrorS(nil, "EndpointSlice address type not supported", "addressType", newEndpointSlice.AddressType)
}
}
@ -120,7 +120,7 @@ func (proxier *metaProxier) OnEndpointSliceDelete(endpointSlice *discovery.Endpo
case discovery.AddressTypeIPv6:
proxier.ipv6Proxier.OnEndpointSliceDelete(endpointSlice)
default:
klog.V(4).Infof("EndpointSlice address type not supported by kube-proxy: %s", endpointSlice.AddressType)
klog.ErrorS(nil, "EndpointSlice address type not supported", "addressType", endpointSlice.AddressType)
}
}