Optimization logging format for pkg/kubelet

Signed-off-by: sanwishe <jiang.mingzhi35@zte.com.cn>
This commit is contained in:
sanwishe 2021-05-25 08:52:08 +08:00
parent f545438bd3
commit 9e257ec194
4 changed files with 5 additions and 5 deletions

View File

@ -1095,7 +1095,7 @@ func (m *ManagerImpl) GetAllocatableDevices() ResourceDeviceInstances {
m.mutex.Lock()
resp := m.allDevices.Clone()
m.mutex.Unlock()
klog.V(4).InfoS("known devices", "numDevices", len(resp))
klog.V(4).InfoS("Known devices", "numDevices", len(resp))
return resp
}

View File

@ -1427,7 +1427,7 @@ func (kl *Kubelet) Run(updates <-chan kubetypes.PodUpdate) {
if err := kl.initializeModules(); err != nil {
kl.recorder.Eventf(kl.nodeRef, v1.EventTypeWarning, events.KubeletSetupFailed, err.Error())
klog.ErrorS(err, "failed to initialize internal modules")
klog.ErrorS(err, "Failed to initialize internal modules")
os.Exit(1)
}
@ -1639,7 +1639,7 @@ func (kl *Kubelet) syncPod(o syncPodOptions) error {
if err := kl.killPod(pod, nil, podStatus, nil); err == nil {
podKilled = true
} else {
klog.ErrorS(err, "killPod failed", "pod", klog.KObj(pod), "podStatus", podStatus)
klog.ErrorS(err, "KillPod failed", "pod", klog.KObj(pod), "podStatus", podStatus)
}
}
// Create and Update pod's Cgroups

View File

@ -566,7 +566,7 @@ func (m *manager) syncPod(uid types.UID, status versionedPodStatus) {
klog.InfoS("Failed to get status for pod",
"podUID", uid,
"pod", klog.KRef(status.podNamespace, status.podName),
"error", err)
"err", err)
return
}

View File

@ -408,7 +408,7 @@ func (rc *reconciler) syncStates() {
continue
}
// No pod needs the volume.
klog.InfoS("Could not construct volume information, cleaning up mounts", "podName", volume.podName, "volumeSpecName", volume.volumeSpecName, "error", err)
klog.InfoS("Could not construct volume information, cleaning up mounts", "podName", volume.podName, "volumeSpecName", volume.volumeSpecName, "err", err)
rc.cleanupMounts(volume)
continue
}