Skip to content
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

Support lookarounds for allow and deny lists? #2594

Open
rexagod opened this issue Jan 20, 2025 · 1 comment
Open

Support lookarounds for allow and deny lists? #2594

rexagod opened this issue Jan 20, 2025 · 1 comment
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.

Comments

@rexagod
Copy link
Member

rexagod commented Jan 20, 2025

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 deny kube_namespace_created, that's not possible as the standard regexp package has to guarantee an O(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.

@rexagod rexagod added the kind/bug Categorizes issue or PR as related to a bug. label Jan 20, 2025
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If kube-state-metrics contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Jan 20, 2025
@rexagod rexagod added 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. and removed kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

2 participants