Description
Feature request description
Hello,
I have some code that listens to podman events (using podman events --stream --output json --no-trunc
) and reacts to certain events.
The code needs to behave differently based on annotations associated with the objects (pod in my case but the same could be true for containers).
Currently, annotations are not included in the events, meaning that a separate command must be used to retrieve them, which causes other issues (e.g. race conditions).
Suggest potential solution
Include annotations associated with an object in events generated for that object.
Have you considered any alternatives?
Alternative solution : retrieve the annotations separately using podman inspect <object>
.
However, doing so runs into a race condition where the object may have already disappeared (e.g. when running a short-lived pod or container to do a task) and the annotations cannot be retrieved.
Additional context
Tested on podman version 4.9.4.