Skip to content

Include annotations in events #24467

Open
@fpoirotte

Description

@fpoirotte

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.stale-issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions