Skip to content

Commit

Permalink
[fix] lint
Browse files Browse the repository at this point in the history
  • Loading branch information
heliapb committed Oct 28, 2024
1 parent 0df0e53 commit e69df3c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/analyzers/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ func checkPrometheusNamespaceSelectors(ctx context.Context, clientSets *k8sutil.

namespaces, err := clientSets.KClient.CoreV1().Namespaces().List(ctx, metav1.ListOptions{LabelSelector: labels.SelectorFromSet(labelMap).String(),})

if err != nil {
return fmt.Errorf("Failed to list Namespaces: %v", err)
}

if len(namespaces.Items) == 0 {
return fmt.Errorf("No Namespaces match the provided selector")
}
Expand Down

0 comments on commit e69df3c

Please sign in to comment.