derailed / popeye

👀 A Kubernetes cluster resource sanitizer
https://popeyecli.io
Other
5.11k stars 278 forks source link

Add annotation to skip resources #160

Open danibaeyens opened 3 years ago

danibaeyens commented 3 years ago




Is your feature request related to a problem? Please describe. We have a use case where we own a set of multi-tenant clusters, being a central team. Clusters have different namespaces owned by different teams.

Central team may want to get a general overview report of the cluster status. Each tenant team can run themselves their popeye report to check their own status and fix their namespace.

Still, central team wants to provide the ability to tenant teams to annotate a certain resource, so checks are skipped for it on both runs:

Describe the solution you'd like Specific resources (any) could be annotated with an annotation like: popeyecli.io/skip-checks: "true" which will raise an info message stating "Resource xx/yyyy has been skipped"

Describe alternatives you've considered A clear alternative could be that the central teams have a public config file and the tenant team can trigger a PR with a change on the excludes section, but still, I prefer the annotation as an info is also notifying the central team the resources that are proactively ignored.

Additional context

marians commented 3 years ago

I like the suggestion. One thing to think about is a way to make the annotation more expressive (than just binary true/false), e. g. to disable certain checks, but not others.

derailed commented 5 months ago

@marians @danibaeyens Thank you both for piping in. I like the concept but I think it would be tough to convey variations or be as expressive as a spinach config. Another issue to consider here is what if you want to run popeye wide open?

danibaeyens commented 5 months ago

@derailed the reason for this issue was the explanation here: https://github.com/derailed/popeye/issues/144#issuecomment-870583458 Worst case, I might recommend teams to use the grafana dashboard to pick and choose their score depending on the rules they want to watch.