-
Notifications
You must be signed in to change notification settings - Fork 763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow custom labels for gatekeeper_violations #1649
Comments
Clarification: you want the prometheus metric Any thoughts on using logs for this? It should have most of the needed data (no data on what labels the violating object has though): https://open-policy-agent.github.io/gatekeeper/website/docs/audit#audit-logs |
logs would also work since we can get stats from them via log search or logrecycler but we'd still need the extra labels |
the audit logs could be used to fetch the resource and then do custom label metrics from that, but that's also not easy or performant :( |
related #1037 |
TBH logs seems like a better fit for a few reasons:
To expand on the last point, we could essentially log the entire violating object if we wanted, letting users take the object labels, annotations, or whatever else was interesting to them. For Prometheus metrics, labels are flat (i.e. not namespaced). That means if we allowed users to specify custom labels (like |
For labels: they could be prefixed with |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
We want to audit a large list of resources (5k+).
Putting the violations onto the rules will not scale since we'd hit etcd object limit.
So we need gatekeeper_violations to b the source of "what is a violation".
For this we'd like to use "project" label of each resource, so that we can say "hey team foo your bar project has 25 violations".
I understand this can be a memory leak for prometheus and is very bike-sheedy, so this should be opt-in functionality.
Additionally it should track
kind
either by default or via opt-in.The text was updated successfully, but these errors were encountered: