From 5cb2b7958cbbce0a0b104dd5880eadb788dfd2f8 Mon Sep 17 00:00:00 2001 From: Francesco Romani Date: Tue, 10 Feb 2026 17:13:40 +0100 Subject: [PATCH] podresources: partially revert PR135485 Partially reverts https://github.com/kubernetes/kubernetes/pull/135485 We had a FG to explicitly provide backward compatible behavior for a underspecified flow. PR#135485 wanted to deflake tests, but the unwanted side effect was to make the two flows in both sides of the FG almost identical. This makes the whole point of having a FG moot, but we promised a period on which we enable to revert the behavior and report issues. This was noticed while inspecting the podresources API lane when checking the graduation: https://github.com/kubernetes/enhancements/pull/5875 Signed-off-by: Francesco Romani --- pkg/kubelet/apis/podresources/server_v1.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/pkg/kubelet/apis/podresources/server_v1.go b/pkg/kubelet/apis/podresources/server_v1.go index 3d23ead0905..92822f724ed 100644 --- a/pkg/kubelet/apis/podresources/server_v1.go +++ b/pkg/kubelet/apis/podresources/server_v1.go @@ -67,17 +67,7 @@ func (p *v1PodResourcesServer) List(ctx context.Context, req *podresourcesv1.Lis // GetActivePods already filters out terminal pods, so no need for additional filtering. pods = p.podsProvider.GetActivePods() } else { - // GetPods may include terminal pods, so we filter them out ourselves. - allPods := p.podsProvider.GetPods() - pods = make([]*v1.Pod, 0, len(allPods)) - for _, pod := range allPods { - // Skip terminal pods (Failed or Succeeded). - // Terminal pods should not appear in podresources as they no longer consume resources. - if podutil.IsPodTerminal(pod) { - continue - } - pods = append(pods, pod) - } + pods = p.podsProvider.GetPods() } podResources := make([]*podresourcesv1.PodResources, len(pods))