From 71e676e6e70fd631f97fed00b5c6f2f22044b5bd Mon Sep 17 00:00:00 2001 From: Nico Berlee Date: Wed, 12 Jun 2024 11:11:08 +0200 Subject: [PATCH] fix: do not wait for initContainer to exit when it is a sidecar in order to support initContainer RestartPolicy I had to update client-go to 1.29 fixes #2865 Signed-off-by: Nico Berlee --- pkg/devspace/kubectl/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/devspace/kubectl/util.go b/pkg/devspace/kubectl/util.go index ce09f522cf..9f571b38b6 100644 --- a/pkg/devspace/kubectl/util.go +++ b/pkg/devspace/kubectl/util.go @@ -96,7 +96,7 @@ func GetPodStatus(pod *corev1.Pod) string { container := pod.Status.InitContainerStatuses[i] switch { - case container.State.Terminated != nil && container.State.Terminated.ExitCode == 0: + case (container.State.Terminated != nil && container.State.Terminated.ExitCode == 0) || (container.State.Running != nil && pod.Spec.RestartPolicy == corev1.RestartPolicyAlways): continue case container.State.Terminated != nil: // initialization is failed