-
Notifications
You must be signed in to change notification settings - Fork 2k
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 namespace selector for filtering #2132
Comments
Hello, |
/assign @dgrisonnet |
This comment was marked as spam.
This comment was marked as spam.
What you are proposing would be to add label selector rather than a namespace selector. We already have a namespace selector with the What you could do today to have a similar result would be to do:
and append the list of namespaces to the --namespaces option of kube-state-metrics. |
@dgrisonnet your solution works, but cannot be scaled especiallyon on a managed k8s cluster. Admin will be solliciated on very newly created important namespace, and it implies redeployement of the stack. |
Just want to mention this here. This idea could help with #2400 as well. In a limited privilege environment this could help with only listing resources on namespaces the service account is privy too through the use of labels and selector at the namespace level. |
What would you like to be added:
Support using namespace selector for filtering which resources to acquire metrics for.
Why is this needed:
This would seem to fit more naturally into the kubernetes model of using selectors to select resources. Also, this makes it easier to select on namespaces that have a label, rather then trying to manage a list of namespace names.
Describe the solution you'd like
--namespace-selector workload=testme
would select all namespaces with the labelworkload
equal to the valuetestm
.Additional context
The text was updated successfully, but these errors were encountered: