-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
Feature request description
When using podman events one can specify a label filter.
The filter has to explicitly contain the label key as well as the label value to get the events, e.g. for a container.
This does not allow filtering for events, where the label key is known but the value isn't. E.g. filter all events with key foo, no matter what the value is.
This can be reproduced like this:
- Listen to all events with label key
foo:podman events --filter label="foo" - Start a container with the label:
podman run --label "foo=bar" --rm --name echo docker.io/ealen/echo-server
In this case, no event is received.
On the other hand, when explicitly stating key and value like this:
podman events --filter label="foo=bar"podman run --label "foo=bar" --rm --name echo docker.io/ealen/echo-server
the container start and stop events are shown.
Other commands like podman container ls do seem to support the label key only syntax:
podman container ls --filter label="foo"will list the container.
Suggest potential solution
podman events filter should behave the same as the podman container ls filter, e.g. when given only a label key, all resources should be returned with the given label key, no matter the label value.
Have you considered any alternatives?
No response
Additional context
This is a feature that is also supported by Dockers event filter, e.g. from their docs:
The currently supported filters are:
- label (
label=<key>orlabel=<key>=<value>)- [...]