Closed realshuting closed 6 months ago
When the creation of the event fails, it is re-queued again up to 3 times. In case, it exceeds the limit, then the event is dropped. https://github.com/kyverno/kyverno/blob/2503e000f360013ac17fc7d79fae3dd01df19648/pkg/event/controller.go#L122-L130
The issue is that we are trying to create an event in a deleted namespace. First, we should check if the namespace exists before proceeding to create the events.
AFAIK, there is no such limit.
Kyverno Version
1.12.0
Kubernetes Version
1.26.x
Kubernetes Platform
KinD
Kyverno Rule Type
Validate
Description
When running this load test to create 1k iterations across 100 virtual users, Kyverno kept creating events even if the namespace was being terminated, the logs were flooded with the following message:
When I decreased the test to create 100 iterations across 10 virtual users, the events creation stopped at some point but still failed because the namespace was deleted.
There are a few questions need to be answered:
Steps to reproduce
Expected behavior
The event generation should not occupy the main process especially when there's a flood of admission requests.
Screenshots
No response
Kyverno logs
No response
Slack discussion
No response
Troubleshooting