Skip to content

Commit

Permalink
When CreatePod fails, dump pod options
Browse files Browse the repository at this point in the history
  • Loading branch information
e-sumin committed Nov 10, 2023
1 parent ce5f758 commit fb38cbf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/kube/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,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 {
log.Error().WithContext(ctx).WithError(err).Print("Failed to create pod.", field.M{"pod": pod, "options": opts})
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 fb38cbf

Please sign in to comment.