Skip to content

Commit

Permalink
added log level
Browse files Browse the repository at this point in the history
  • Loading branch information
NoSkillGirl committed Nov 26, 2020
1 parent bfab77a commit 3a29f3a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/kyverno/apply/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,15 @@ To apply policy with variables:
err := policy2.Validate(utils.MarshalPolicy(*policy), nil, true, openAPIController)
if err != nil {
rc.skip += len(resources)
fmt.Printf("\nskipping policy %v as it is not valid: %v\n", policy.Name, err)
log.Log.V(3).Info(fmt.Sprintf("skipping policy %v as it is not valid: %v\n", policy.Name), "error", err)
continue
}

matches := common.PolicyHasVariables(*policy)
variable := removeDuplicatevariables(matches)

if len(matches) > 0 && variablesString == "" && valuesFile == "" {
rc.skip++
skipPolicy := SkippedPolicy{
Name: policy.GetName(),
Rules: policy.Spec.Rules,
Expand Down

0 comments on commit 3a29f3a

Please sign in to comment.