Skip to content

Commit

Permalink
Supress Error Logs (#1255)
Browse files Browse the repository at this point in the history
* supressed  validation and crd error log

* small fix
  • Loading branch information
NoSkillGirl committed Nov 14, 2020
1 parent 74b6567 commit c9b6c1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/engine/generation.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func filterRule(rule kyverno.Rule, resource unstructured.Unstructured, admission

// add configmap json data to context
if err := AddResourceToContext(log, rule.Context, resCache, jsonContext); err != nil {
log.Info("cannot add configmaps to context", "reason", err.Error())
log.V(4).Info("cannot add configmaps to context", "reason", err.Error())
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/webhooks/mutation.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (ws *WebhookServer) HandleMutation(

err := ws.openAPIController.ValidateResource(*engineResponse.PatchedResource.DeepCopy(), engineResponse.PatchedResource.GetKind())
if err != nil {
logger.Error(err, "validation error", "policy", policy.Name)
logger.V(4).Info("validation error", "policy", policy.Name, "error", err)
continue
}

Expand Down

0 comments on commit c9b6c1f

Please sign in to comment.