Skip to content

Commit

Permalink
remove unnecessary else
Browse files Browse the repository at this point in the history
  • Loading branch information
kale-amruta committed Oct 20, 2022
1 parent 19c80ea commit 17b63c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/kube/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,17 @@ func CreatePod(ctx context.Context, cli kubernetes.Interface, opts *PodOptions)

pod := &v1.Pod{
ObjectMeta: metav1.ObjectMeta{
GenerateName: opts.GenerateName,
Labels: map[string]string{
consts.LabelKeyCreatedBy: consts.LabelValueKanister,
},
},
Spec: patchedSpecs,
}

// Add fixed name to a pod
if opts.Name != "" {
pod.Name = opts.Name
} else {
pod.GenerateName = opts.GenerateName
}

// Override default container name if applicable
Expand Down

0 comments on commit 17b63c7

Please sign in to comment.