diff --git a/pkg/engine/validation.go b/pkg/engine/validation.go index 168d89a11e..16c5300be7 100644 --- a/pkg/engine/validation.go +++ b/pkg/engine/validation.go @@ -122,7 +122,6 @@ func validatePatterns(resource unstructured.Unstructured, rule kyverno.Rule) (re if len(errs) > 0 { glog.V(4).Infof("none of anyPattern were processed: %v", errs) response.Success = false - response.Success = false var errorStr []string for index, err := range errs { glog.V(4).Infof("anyPattern[%d] failed at path %s: %v", index, failedPaths[index], err) diff --git a/pkg/policy/report.go b/pkg/policy/report.go index 162e029372..7323f0d0e3 100644 --- a/pkg/policy/report.go +++ b/pkg/policy/report.go @@ -31,7 +31,9 @@ func (pc *PolicyController) cleanUp(ers []engine.EngineResponse) { if !er.IsSuccesful() { continue } - // glog.Info(er.PolicyResponse) + if len(er.PolicyResponse.Rules) == 0 { + continue + } // clean up after the policy has been corrected pc.cleanUpPolicyViolation(er.PolicyResponse) }