Skip to content

Commit

Permalink
fix check
Browse files Browse the repository at this point in the history
Signed-off-by: xliuqq <xlzq1992@gmail.com>
  • Loading branch information
xliuqq committed Apr 9, 2024
1 parent 4ccbda9 commit dacb7f3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/utils/kubeclient/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ func GetSucceedPodForJob(c client.Client, job *v1.Job) (*corev1.Pod, error) {
Namespace: job.Namespace,
LabelSelector: selector,
})
if err != nil {
return nil, fmt.Errorf("error listing pods for Job %s in namespace %s: %v", job.Name, job.Namespace, err)
}

for _, pod := range podList.Items {
if IsSucceededPod(&pod) {
Expand Down

0 comments on commit dacb7f3

Please sign in to comment.