fix: correctly wait for the pod to be ready

This commit is contained in:
Jose Diaz-Gonzalez committed 2024-11-04 14:38:06 -05:00
1 parent 62125c5b72
commit adffab13d9
2 files changed
+9 -8

No files matched your search

+2 -1
View File
@@ -1190,7 +1190,7 @@ func TriggerSchedulerRun(scheduler string, appName string, envCount int, args []
Clientset: clientset,
Namespace: namespace,
LabelSelector: batchJobSelector,
Timeout: 300,
Timeout: 10,
Waiter: isPodReady,
})
if err != nil {
@@ -1254,6 +1254,7 @@ func TriggerSchedulerRun(scheduler string, appName string, envCount int, args []
Command: command,
Entrypoint: entrypoint,
SelectedPod: selectedPod,
WaitTimeout: 10,
})
default:
return fmt.Errorf("Unable to attach as the pod is in an unknown state: %s", selectedPod.Status.Phase)