From eaa1dd9f91cfc65a45f3e024497857160efc4c45 Mon Sep 17 00:00:00 2001 From: Murong Lin Date: Wed, 23 Oct 2024 13:21:03 -0700 Subject: [PATCH] prevent follow initContainer to run if previous sidecar container failed to start --- pkg/kubelet/kuberuntime/kuberuntime_manager.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkg/kubelet/kuberuntime/kuberuntime_manager.go b/pkg/kubelet/kuberuntime/kuberuntime_manager.go index 86976ac2b54ba..09ac9ffb8e934 100644 --- a/pkg/kubelet/kuberuntime/kuberuntime_manager.go +++ b/pkg/kubelet/kuberuntime/kuberuntime_manager.go @@ -1286,10 +1286,6 @@ func (m *kubeGenericRuntimeManager) SyncPod(ctx context.Context, pod *v1.Pod, po container := &pod.Spec.InitContainers[idx] // Start the next init container. if err := start(ctx, "init container", metrics.InitContainer, containerStartSpec(container)); err != nil { - if types.IsRestartableInitContainer(container) { - klog.V(4).InfoS("Failed to start the restartable init container for the pod, skipping", "initContainerName", container.Name, "pod", klog.KObj(pod)) - continue - } klog.V(4).InfoS("Failed to initialize the pod, as the init container failed to start, aborting", "initContainerName", container.Name, "pod", klog.KObj(pod)) return }