Skip to content

Commit

Permalink
Merge pull request #5 from Bisnode/no_list_serviceaccount_secrets
Browse files Browse the repository at this point in the history
Only list opaque secrets
  • Loading branch information
anderseknert authored May 20, 2020
2 parents abfd7d0 + d88f010 commit aa187de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/get_secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ func GetSecretList(clientSet kubernetes.Interface) (secrets []string, err error)
secretList, err := clientSet.
CoreV1().
Secrets(Namespace).
List(metav1.ListOptions{})
List(metav1.ListOptions{
FieldSelector: fmt.Sprintf("type=Opaque"),
})

if err != nil {
fmt.Printf("Failed to list secrets in namespace %v: %v\n", Namespace, err.Error())
Expand Down

0 comments on commit aa187de

Please sign in to comment.