Skip to content

Commit

Permalink
Fix bug with forgotten old way pod readiness check
Browse files Browse the repository at this point in the history
  • Loading branch information
e-sumin committed Sep 19, 2023
1 parent 57ecd20 commit db19f7f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/function/delete_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,12 @@ func deleteData(
PodOverride: podOverride,
}
pr := kube.NewPodRunner(cli, options)
podFunc := deleteDataPodFunc(cli, tp, reclaimSpace, encryptionKey, targetPaths, deleteTags, deleteIdentifiers)
podFunc := deleteDataPodFunc(tp, reclaimSpace, encryptionKey, targetPaths, deleteTags, deleteIdentifiers)
return pr.RunEx(ctx, podFunc)
}

//nolint:gocognit
func deleteDataPodFunc(
cli kubernetes.Interface,
tp param.TemplateParams,
reclaimSpace bool,
encryptionKey string,
Expand All @@ -110,7 +109,7 @@ func deleteDataPodFunc(
pod := pc.Pod()

// Wait for pod to reach running state
if err := kube.WaitForPodReady(ctx, cli, pod.Namespace, pod.Name); err != nil {
if err := pc.WaitForPodReady(ctx); err != nil {
return nil, errors.Wrapf(err, "Failed while waiting for Pod %s to be ready", pod.Name)
}

Expand Down

0 comments on commit db19f7f

Please sign in to comment.