Skip to content

Commit

Permalink
fix engine.PolicyContext issue
Browse files Browse the repository at this point in the history
Signed-off-by: vyankatesh_neualto <vyankatesh@neualto.com>
  • Loading branch information
vyankd committed Feb 2, 2021
1 parent 27f9b47 commit 18f20ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/kyverno/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ func ApplyPolicyOnResource(policy *v1.ClusterPolicy, resource *unstructured.Unst
}

if policyHasGenerate {
generateResponse := engine.Generate(engine.PolicyContext{Policy: *policy, NewResource: *resource})
generateResponse := engine.Generate(&engine.PolicyContext{Policy: *policy, NewResource: *resource})
engineResponses = append(engineResponses, generateResponse)
if len(generateResponse.PolicyResponse.Rules) > 0 {
log.Log.V(3).Info("generate resource is valid", "policy", policy.Name, "resource", resPath)
Expand Down

0 comments on commit 18f20ab

Please sign in to comment.