mirror of
https://github.com/kyverno/kyverno.git
synced 2025-04-08 18:15:48 +00:00
fix linter issue
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
This commit is contained in:
parent
e3ba38b165
commit
882c826c7d
1 changed files with 4 additions and 1 deletions
|
@ -131,7 +131,10 @@ func Mutate(policyContext *PolicyContext) (resp *response.EngineResponse) {
|
|||
logger.V(4).Info("mutate rule applied successfully", "ruleName", rule.Name)
|
||||
}
|
||||
|
||||
ctx.AddResourceAsObject(patchedResource.Object)
|
||||
if err := ctx.AddResourceAsObject(patchedResource.Object); err != nil {
|
||||
logger.Error(err, "failed to update resource in the JSON context")
|
||||
}
|
||||
|
||||
resp.PolicyResponse.Rules = append(resp.PolicyResponse.Rules, ruleResponse)
|
||||
incrementAppliedRuleCount(resp)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue