Update pkg/kubelet/pleg/generic.go

Co-authored-by: Elana Hashman <ehashman@users.noreply.github.com>
This commit is contained in:
Paco Xu 2021-03-26 13:19:51 +08:00 committed by GitHub
parent 3fc1e0891b
commit 54606db1b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -383,9 +383,10 @@ func (g *GenericPLEG) updateCache(pod *kubecontainer.Pod, pid types.UID) error {
// GetPodStatus(pod *kubecontainer.Pod) so that Docker can avoid listing
// all containers again.
status, err := g.runtime.GetPodStatus(pod.ID, pod.Name, pod.Namespace)
klog.V(4).ErrorS(err, "PLEG: Write status", "pod", klog.KRef(pod.Namespace, pod.Name))
if klog.V(6).Enabled() {
klog.ErrorS(err, "PLEG: Write status", "pod", klog.KRef(pod.Namespace, pod.Name), "podStatus", status)
klog.V(6).ErrorS(err, "PLEG: Write status", "pod", klog.KRef(pod.Namespace, pod.Name), "podStatus", status)
} else {
klog.V(4).ErrorS(err, "PLEG: Write status", "pod", klog.KRef(pod.Namespace, pod.Name))
}
if err == nil {
// Preserve the pod IP across cache updates if the new IP is empty.