From 0687ae5647d5e012ce52f2ab71cb53f296736678 Mon Sep 17 00:00:00 2001 From: Tim Allclair Date: Mon, 1 Jul 2024 17:00:00 -0700 Subject: [PATCH] [kubelet] Cleanup incorrect log about static pod status change --- pkg/kubelet/kubelet_getters.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/kubelet/kubelet_getters.go b/pkg/kubelet/kubelet_getters.go index a32f197143f..ec22cde4604 100644 --- a/pkg/kubelet/kubelet_getters.go +++ b/pkg/kubelet/kubelet_getters.go @@ -210,12 +210,12 @@ func (kl *Kubelet) getPodResourcesDir() string { // pods. func (kl *Kubelet) GetPods() []*v1.Pod { pods := kl.podManager.GetPods() - // a kubelet running without apiserver requires an additional - // update of the static pod status. See #57106 for i, p := range pods { + // Pod cache does not get updated status for static pods. + // TODO(tallclair): Most callers of GetPods() do not need pod status. We should either parameterize this, + // or move the status injection to only the callers that do need it (maybe just the /pods http handler?). if kubelettypes.IsStaticPod(p) { if status, ok := kl.statusManager.GetPodStatus(p.UID); ok { - klog.V(2).InfoS("Pod status updated", "pod", klog.KObj(p), "status", status.Phase) // do not mutate the cache p = p.DeepCopy() p.Status = status