mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
skip succeed rules when building the blocked return message (#4804)
Signed-off-by: ShutingZhao <shuting@nirmata.com> Signed-off-by: ShutingZhao <shuting@nirmata.com>
This commit is contained in:
parent
4e1c1e6785
commit
e75b57e635
1 changed files with 3 additions and 1 deletions
|
@ -51,7 +51,9 @@ func GetBlockedMessages(engineResponses []*response.EngineResponse) string {
|
|||
}
|
||||
}
|
||||
}
|
||||
failures[er.PolicyResponse.Policy.Name] = ruleToReason
|
||||
if len(ruleToReason) != 0 {
|
||||
failures[er.PolicyResponse.Policy.Name] = ruleToReason
|
||||
}
|
||||
}
|
||||
if len(failures) == 0 {
|
||||
return ""
|
||||
|
|
Loading…
Reference in a new issue