Skip to content

Commit bbe3213

Browse files
committed
fix infinite hang?
1 parent 23691f6 commit bbe3213

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pkg/k8s.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ func (s *JobRunner) isPodInDesiredState(podConfig *corev1.Pod) wait.ConditionWit
444444

445445
func (s *JobRunner) WaitForPod(podConfig *corev1.Pod, timeout time.Duration) error {
446446
s.logger.Debug().Msgf("Waiting for pod %s/%s to be ready in %s ...", podConfig.Namespace, podConfig.Name, timeout)
447-
return wait.PollUntilContextCancel(context.TODO(), timeout, false, s.isPodInDesiredState(podConfig))
447+
return wait.PollUntilContextTimeout(context.Background(), time.Second, timeout, false, s.isPodInDesiredState(podConfig))
448448
}
449449

450450
func (s *JobRunner) DeleteConfigMap(config *corev1.ConfigMap) {

0 commit comments

Comments
 (0)