-
Notifications
You must be signed in to change notification settings - Fork 4.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
feat: Add ability to filter by resource labels and annotations #9572
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: avanish23 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The initial implementation was only meant to work with names. We wanted to take another pass at it. The main flaws of the current approach are:
I would prefer not to rely on current logic to not encourage anyone to extend it as it should be rewritten and optimized. |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
Closes: #7547
Currently, the filtering is allowed by name only, for any resource.
With this PR intends to introduce support for filtering via various parameters
and more.
How can this be done?
This will be done by comma ',' separated values. If the input does not have a comma-separated value, it will be filtered by name by default.
If a comma-separated string is provided then the convention followed should be
property,value
for examplestatus,Running
label,app=dashboard
annotations,sidecar.istio.io/inject=true
For example, if the user input is:
dashboard
the pods filtered will be those that will contain "dashboard" in their name.name,dashboard,label,app=dashboard,status,Running
the pods filtered will be have "dashboard" in their name, a label with key value pair "{app:dashboard}" and status is "Running"