Skip to content

Commit

Permalink
fix(wait): Add panic prevent WaitForPodInitialized
Browse files Browse the repository at this point in the history
Signed-off-by: Suleiman Dibirov <idsulik@gmail.com>
  • Loading branch information
idsulik committed Aug 28, 2024
1 parent d3902b1 commit 237633f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/skaffold/kubernetes/wait.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ func WaitForPodInitialized(ctx context.Context, pods corev1.PodInterface, podNam
defer w.Stop()

return watchUntilTimeout(ctx, 10*time.Minute, w, func(event *watch.Event) (bool, error) {
if event.Object == nil {
return false, nil
}

pod := event.Object.(*v1.Pod)
if pod.Name != podName {
return false, nil
Expand Down

0 comments on commit 237633f

Please sign in to comment.