-
Notifications
You must be signed in to change notification settings - Fork 453
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
Implement the --filter
flag for images
command.
#1359
Implement the --filter
flag for images
command.
#1359
Conversation
Welcome @roman-kiselenko! |
What is wrong with |
@roman-kiselenko, thank you! This is great! 🚀 |
@roman-kiselenko, you might have to generate an updated version. Would be my guess. This would be to reflect the new command-line argument addition, etc. |
Thanks 🙏 docs are updated. |
The following filters are available: 1. `dangling=(true/false)` 2. `reference=regex` 3. `before=<image-name>[:<tag>]|<image id>|<image@digest>` 4. `since=<image-name>[:<tag>]|<image id>|<image@digest>` Signed-off-by: roman-kiselenko <roman.kiselenko.dev@gmail.com>
/retitle Implement the |
@kwilczynski: Re-titling can only be requested by trusted users, like repository collaborators. In response to this:
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/test-infra repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: roman-kiselenko, saschagrunert The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
case strings.HasPrefix(filter, "since="): | ||
filtered = filterByBeforeSince(strings.TrimPrefix(filter, "since="), filtered) | ||
default: | ||
return []*pb.Image{}, fmt.Errorf("Unknown filter flag: %v", filter) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return []*pb.Image{}, fmt.Errorf("Unknown filter flag: %v", filter) | |
return []*pb.Image{}, fmt.Errorf("unknown filter flag: %s", filter) |
@roman-kiselenko, I am sorry for the late review! @saschagrunert made me realise that I forgot to submit my review comments earlier. Doh! Let me know what you think about some of the comments. |
no problem at all, I'll take care of your comments in another PR 😁 |
--filter
flag for images
command.--filter
flag for images
command.
The following filters are available:
dangling=(true/false)
reference=regex
before=<image-name>[:<tag>]|<image id>|<image@digest>
since=<image-name>[:<tag>]|<image id>|<image@digest>
What type of PR is this?
/kind documentation
/kind feature
What this PR does / why we need it:
Filtering images is a good feature for cluster admins; we need a filter flag for the
crictl images
command to reduce shell scripts complexity.Which issue(s) this PR fixes:
Fixes #1256
Special notes for your reviewer:
None
Does this PR introduce a user-facing change?
None
/c @kubernetes-sigs/cri-tools