Skip to content

Commit

Permalink
Merge pull request #33 from deggja/bugfix_29
Browse files Browse the repository at this point in the history
fix: fixes #29
  • Loading branch information
deggja authored Dec 9, 2023
2 parents cffd60a + 7e0fa66 commit 5d92df7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/spf13/cobra"
)

const version = "0.0.60"
const version = "0.0.61"

var rootCmd = &cobra.Command{
Use: "netfetch",
Expand Down
Binary file modified backend/netfetch
Binary file not shown.
7 changes: 7 additions & 0 deletions backend/pkg/k8s/scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ func ScanNetworkPolicies(specificNamespace string, dryRun bool, returnResult boo
}

if specificNamespace != "" {
_, err := clientset.CoreV1().Namespaces().Get(context.TODO(), specificNamespace, metav1.GetOptions{})
if err != nil {
if k8serrors.IsNotFound(err) {
return nil, fmt.Errorf("namespace %s does not exist", specificNamespace)
}
return nil, fmt.Errorf("error checking namespace %s: %s", specificNamespace, err)
}
namespacesToScan = append(namespacesToScan, specificNamespace)
} else {
allNamespaces, err := clientset.CoreV1().Namespaces().List(context.TODO(), metav1.ListOptions{})
Expand Down
2 changes: 1 addition & 1 deletion backend/statik/statik.go

Large diffs are not rendered by default.

0 comments on commit 5d92df7

Please sign in to comment.