Support lookarounds for allow and deny lists? #2594
Labels
kind/feature
Categorizes issue or PR as related to a new feature.
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
What happened: Currently, allow and deny lists are mutually exclusive, and only one of them can be specified at a time. So, for instance, if we want to "deny" all but one metric, for e.g., deny
kube_*_created
but don't denykube_namespace_created
, that's not possible as the standardregexp
package has to guarantee anO(n)
runtime complexity (or less) for all operations, which is not possible for lookarounds.What you expected to happen: Using something like https://github.com/dlclark/regexp2#compare-regexp-and-regexp2 that allows for lookarounds in such expressions.
How to reproduce it (as minimally and precisely as possible):
go run . --kubeconfig=$KUBECONFIG --metric-denylist='^kube_(?<=namespace_created).*_created$'
doesn't work.The text was updated successfully, but these errors were encountered: