Fix e2e test error due to ContainersToUpdate map not created

This commit is contained in:
vivzbansal 2024-11-09 04:14:06 +00:00
parent 9a5c57817a
commit 2ba61325f6

View File

@ -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.