mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Optimization logging format for pkg/kubelet
Signed-off-by: sanwishe <jiang.mingzhi35@zte.com.cn>
This commit is contained in:
parent
f545438bd3
commit
9e257ec194
@ -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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user