Merge pull request #100672 from wangyx1992/structured-log

Structured Logging migration: modify logs of controller-manager
This commit is contained in:
Kubernetes Prow Robot
2021-09-22 20:27:10 -07:00
committed by GitHub
6 changed files with 33 additions and 33 deletions

View File

@@ -88,7 +88,7 @@ func (t *TopologyCache) AddHints(si *SliceInfo) ([]*discovery.EndpointSlice, []*
allocations := t.getAllocations(totalEndpoints)
if allocations == nil {
klog.V(2).Infof("Insufficient endpoints, removing hints from %s Service", si.ServiceKey)
klog.V(2).InfoS("Insufficient endpoints, removing hints from service", "serviceKey", si.ServiceKey)
t.RemoveHints(si.ServiceKey, si.AddressType)
return RemoveHintsFromSlices(si)
}
@@ -104,7 +104,7 @@ func (t *TopologyCache) AddHints(si *SliceInfo) ([]*discovery.EndpointSlice, []*
for _, slice := range allocatableSlices {
for i, endpoint := range slice.Endpoints {
if endpoint.Zone == nil || *endpoint.Zone == "" {
klog.Warningf("Endpoint found without zone specified, removing hints from %s Service", si.ServiceKey)
klog.InfoS("Endpoint found without zone specified, removing hints from service", "serviceKey", si.ServiceKey)
t.RemoveHints(si.ServiceKey, si.AddressType)
return RemoveHintsFromSlices(si)
}