1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-15 17:51:20 +00:00

fix: add verbosity to background scanner log (#10404)

Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
This commit is contained in:
Vishal Choudhary 2024-06-06 17:21:01 +05:30 committed by GitHub
parent 85ad87445a
commit 2104171b4f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -118,7 +118,7 @@ func (s *scanner) validateResource(ctx context.Context, resource unstructured.Un
WithNamespaceLabels(nsLabels)
response := s.engine.Validate(ctx, policyCtx)
if len(response.PolicyResponse.Rules) > 0 {
s.logger.Info("validateResource", "policy", policy, "response", response)
s.logger.V(6).Info("validateResource", "policy", policy, "response", response)
}
return &response, nil
}
@ -140,7 +140,7 @@ func (s *scanner) validateImages(ctx context.Context, resource unstructured.Unst
WithNamespaceLabels(nsLabels)
response, _ := s.engine.VerifyAndPatchImages(ctx, policyCtx)
if len(response.PolicyResponse.Rules) > 0 {
s.logger.Info("validateImages", "policy", policy, "response", response)
s.logger.V(6).Info("validateImages", "policy", policy, "response", response)
}
return &response, nil
}