From 2ba61325f69f7d79f9d51e908eea581af0561c8c Mon Sep 17 00:00:00 2001 From: vivzbansal Date: Sat, 9 Nov 2024 04:14:06 +0000 Subject: [PATCH] Fix e2e test error due to ContainersToUpdate map not created --- pkg/kubelet/kuberuntime/kuberuntime_manager.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/kubelet/kuberuntime/kuberuntime_manager.go b/pkg/kubelet/kuberuntime/kuberuntime_manager.go index cd8d53e1f8b..8062936b29a 100644 --- a/pkg/kubelet/kuberuntime/kuberuntime_manager.go +++ b/pkg/kubelet/kuberuntime/kuberuntime_manager.go @@ -985,6 +985,10 @@ func (m *kubeGenericRuntimeManager) computePodActions(ctx context.Context, pod * } } + if IsInPlacePodVerticalScalingAllowed(pod) { + changes.ContainersToUpdate = make(map[v1.ResourceName][]containerToUpdateInfo) + } + // Check initialization progress. if !handleRestartableInitContainers { initLastStatus, next, done := findNextInitContainerToRun(pod, podStatus) @@ -1020,10 +1024,6 @@ func (m *kubeGenericRuntimeManager) computePodActions(ctx context.Context, pod * } } - if IsInPlacePodVerticalScalingAllowed(pod) { - changes.ContainersToUpdate = make(map[v1.ResourceName][]containerToUpdateInfo) - } - // Number of running containers to keep. keepCount := 0 // check the status of containers.