mirror of
https://github.com/kyverno/kyverno.git
synced 2025-04-15 00:36:28 +00:00
Added Overlay logic to mutation handling
This commit is contained in:
parent
1219063ff8
commit
101870fb5e
1 changed files with 2 additions and 2 deletions
|
@ -29,11 +29,11 @@ func Mutate(policy kubepolicy.Policy, rawResource []byte, gvk metav1.GroupVersio
|
|||
// Process Overlay
|
||||
|
||||
if rule.Mutation.Overlay != nil {
|
||||
//overlayPatches, err := ProcessOverlay(rule.Mutation.Overlay, rawResource)
|
||||
overlayPatches, err := ProcessOverlay(policy, rawResource, gvk)
|
||||
if err != nil {
|
||||
log.Printf("Overlay application has failed for rule %s in policy %s, err: %v\n", rule.Name, policy.ObjectMeta.Name, err)
|
||||
} else {
|
||||
//policyPatches = append(policyPatches, overlayPatches...)
|
||||
policyPatches = append(policyPatches, overlayPatches...)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue