Skip to content

Commit

Permalink
Fix panic in case when pod creation failed (#1898)
Browse files Browse the repository at this point in the history
  • Loading branch information
e-sumin committed Feb 14, 2023
1 parent 5c23024 commit 8262fad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/kube/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func CreatePod(ctx context.Context, cli kubernetes.Interface, opts *PodOptions)

pod, err = cli.CoreV1().Pods(pod.Namespace).Create(ctx, pod, metav1.CreateOptions{})
if err != nil {
return nil, errors.Wrapf(err, "Failed to create pod. Namespace: %s, NameFmt: %s", pod.Namespace, opts.GenerateName)
return nil, errors.Wrapf(err, "Failed to create pod. Namespace: %s, NameFmt: %s", opts.Namespace, opts.GenerateName)
}
return pod, nil
}
Expand Down

0 comments on commit 8262fad

Please sign in to comment.