1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00

Merge pull request #2538 from NoSkillGirl/adding_error_count_for_mutate_in_CLI

Added error count for mutate response | CLI
This commit is contained in:
Pooja Singh 2021-10-14 01:55:30 +05:30 committed by GitHub
commit 7e5a75a281
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -931,6 +931,9 @@ func processMutateEngineResponse(policy *v1.ClusterPolicy, mutateResponse *respo
} else if mutateResponseRule.Status == response.RuleStatusSkip {
fmt.Printf("\nskipped mutate policy %s -> resource %s", policy.Name, resPath)
rc.Skip++
} else if mutateResponseRule.Status == response.RuleStatusError {
fmt.Printf("\nerror while applying mutate policy %s -> resource %s\nerror: %s", policy.Name, resPath, mutateResponseRule.Message)
rc.Error++
} else {
if printCount < 1 {
fmt.Printf("\nfailed to apply mutate policy %s -> resource %s", policy.Name, resPath)