[bug]: Events are not correctly generated in relation with the source entity
oionut opened this issue · 2 comments
oionut commented
Describe the bug
The wrong event instance is updated
To reproduce
- Create a CR (CR1) and publish an event
await eventPublisher(entity, "RECONCILED", "Entity was reconciled.");
- Delete the CR
- Create a new CR (CR2) and and publish an event with the same message as
await eventPublisher(entity, "RECONCILED", "Entity was reconciled.");
When running the kubectl describe CR1 no event is listed
Note: run the same scenario without step 2, the event published for the CR2 entity is visible only on CR1
Expected behavior
When running the kubectl describe CR1, one event should be listed
Screenshots
No response
Additional Context
Potential fix: in
, include in the event name the entity UID in order to link the name to the specific entity the event is generated for.oionut commented
anther option would be to provide an overload that allows setting the event name from outside