popeye icon indicating copy to clipboard operation
popeye copied to clipboard

unable to globally filter namespaces?

Open JeffMelton opened this issue 9 months ago • 1 comments




Describe the bug I'm unable to globally filter a specific namespace. The config is a little bit counterintuitive, in that the idea of excluding namespaces suggests that popeye will check all namespaces by default. That isn't the case, from what I can tell. If I don't use the -A flag, it only checks the default namespace. Then, using -A with the example spinach.yaml from the docs:

popeye:
  excludes:
    global:
      fqns: [rx:^kube-] # => excludes all resources in kube-system, kube-public, etc..

... does not in fact exclude all resources from kube- prefixed namespaces. It feels like -A is overriding the config? but I don't know how else to get all namespaces but the ones I globally exclude. 🤷🏽

To Reproduce Steps to reproduce the behavior:

  1. Use a minimal config:
popeye:
  excludes:
    global:
      fqns: [kube-system]
  1. Run popeye with that config:
popeye -A -f ./spinach.yaml
  1. Observe resources from the kube-system namespace in the report. 🪄 🔥

Expected behavior No resources from globally-filtered namespaces should appear in the popeye report. 🚫

Screenshots

Image

Versions (please complete the following information):

  • OS: macOS 15.4
  • Popeye: 0.22.1
  • K8s: 1.25.6 (I know, it's old; enterprises be enterprisin')

Additional context It is entirely possible I'm Holding It Wrong ™ 😄 It's also possible the decrepit versions of k8s I'm stuck with don't play nicely with our spinach-eating friend. 🙃 TIA in any case, and thanks for building cool/helpful tools (k9s too!).

JeffMelton avatar Apr 11 '25 16:04 JeffMelton

same issue here. using popeye 0.22.1

Edit: From my testing, it will only exclude errors from the report. So in your example, only "OK" resources found in kube-system will still pop up. Imo, it should exclude everything of kube-system from the report...

arodindev avatar Sep 18 '25 13:09 arodindev