1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-31 03:45:17 +00:00

Fix bug in event creation for failed policies (#2652)

Signed-off-by: yulianedyalkova <julianedialkova@gmail.com>
This commit is contained in:
Yulia Nedyalkova 2021-11-03 10:55:58 +00:00 committed by GitHub
parent 4eab46fb7d
commit 40d30df726
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -208,7 +208,7 @@ func generateFailEventsPerEr(log logr.Logger, er *response.EngineResponse) []eve
logger.V(4).Info("reporting fail results for policy")
for _, rule := range er.PolicyResponse.Rules {
if rule.Status != response.RuleStatusPass {
if rule.Status == response.RuleStatusPass {
continue
}
// generate event on resource for each failed rule