Skip to content

Commit 231a618

Browse files
zqureshifntlnz
authored andcommitted
Attacher continues retrying if pod not found
1 parent 0457640 commit 231a618

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/attacher/attach.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ func (a *Attacher) Attach(selector, namespace string) {
6868
}
6969

7070
if len(pl.Items) == 0 {
71-
return false, fmt.Errorf(podNotFoundError)
71+
// A job might have been created but the pod scheduling could have been delayed
72+
// therefore we cannot simply error out here and must continue retrying.
73+
return false, nil
7274
}
7375
pod := &pl.Items[0]
7476
if pod.Status.Phase == corev1.PodSucceeded || pod.Status.Phase == corev1.PodFailed {

0 commit comments

Comments
 (0)