mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-31 03:45:17 +00:00
Fix pr image verify blocked (#4297)
* update log levels Signed-off-by: Jim Bugwadia <jim@nirmata.com> * do not generate policy reports for blocked images Signed-off-by: Jim Bugwadia <jim@nirmata.com>
This commit is contained in:
parent
421b490c56
commit
66c3b3b8d0
1 changed files with 3 additions and 3 deletions
|
@ -430,9 +430,6 @@ func (h *handlers) handleVerifyImages(logger logr.Logger, request *admissionv1.A
|
|||
verifiedImageData.Merge(ivm)
|
||||
}
|
||||
|
||||
prInfos := policyreport.GeneratePRsFromEngineResponse(engineResponses, logger)
|
||||
h.prGenerator.Add(prInfos...)
|
||||
|
||||
failurePolicy := policyContext.Policy.GetSpec().GetFailurePolicy()
|
||||
blocked := blockRequest(engineResponses, failurePolicy, logger)
|
||||
if !isResourceDeleted(policyContext) {
|
||||
|
@ -445,6 +442,9 @@ func (h *handlers) handleVerifyImages(logger logr.Logger, request *admissionv1.A
|
|||
return false, getBlockedMessages(engineResponses), nil, nil
|
||||
}
|
||||
|
||||
prInfos := policyreport.GeneratePRsFromEngineResponse(engineResponses, logger)
|
||||
h.prGenerator.Add(prInfos...)
|
||||
|
||||
if !verifiedImageData.IsEmpty() {
|
||||
hasAnnotations := hasAnnotations(policyContext)
|
||||
annotationPatches, err := verifiedImageData.Patches(hasAnnotations, logger)
|
||||
|
|
Loading…
Add table
Reference in a new issue