Skip to content

Commit

Permalink
remove unecessary clientset instantiation
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig O'Donnell committed Nov 20, 2023
1 parent 036c442 commit 1090e61
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions pkg/snapshot/velero.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,6 @@ func DetectVeleroNamespace(ctx context.Context, clientset kubernetes.Interface,
veleroNamespace = TryGetVeleroNamespaceFromConfigMap(ctx, clientset, kotsadmNamespace)
}

clientset, err := k8sutil.GetClientset()
if err != nil {
return "", errors.Wrap(err, "failed to get k8s clientset")
}

deployments, err := clientset.AppsV1().Deployments(veleroNamespace).List(ctx, metav1.ListOptions{})
if kuberneteserrors.IsNotFound(err) {
return "", nil
Expand Down

0 comments on commit 1090e61

Please sign in to comment.