mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
Fix k3s run:detached not returning pod name in a similar fashion to docker-local (as described in docs)
This commit is contained in:
@@ -1192,7 +1192,7 @@ func TriggerSchedulerRun(scheduler string, appName string, envCount int, args []
|
||||
}
|
||||
|
||||
batchJobSelector := fmt.Sprintf("batch.kubernetes.io/job-name=%s", createdJob.Name)
|
||||
_, err = waitForPodToExist(ctx, WaitForPodToExistInput{
|
||||
pods, err := waitForPodToExist(ctx, WaitForPodToExistInput{
|
||||
Clientset: clientset,
|
||||
Namespace: namespace,
|
||||
RetryCount: 3,
|
||||
@@ -1202,6 +1202,7 @@ func TriggerSchedulerRun(scheduler string, appName string, envCount int, args []
|
||||
return fmt.Errorf("Error waiting for pod to exist: %w", err)
|
||||
}
|
||||
if !attachToPod {
|
||||
fmt.Println(pods[0].Name)
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -1254,7 +1255,7 @@ func TriggerSchedulerRun(scheduler string, appName string, envCount int, args []
|
||||
return fmt.Errorf("Error waiting for pod to be running: %w", err)
|
||||
}
|
||||
|
||||
pods, err := clientset.ListPods(ctx, ListPodsInput{
|
||||
pods, err = clientset.ListPods(ctx, ListPodsInput{
|
||||
Namespace: namespace,
|
||||
LabelSelector: batchJobSelector,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user