1
0
Fork 0
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:
kacejot 2019-05-22 22:54:38 +01:00
parent 1219063ff8
commit 101870fb5e

View file

@ -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...)
}
}