1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-31 03:45:17 +00:00

Fixed issue: Overlay was not applied

This commit is contained in:
kacejot 2019-05-23 14:51:41 +03:00
parent cc5e556631
commit 7052d4bb93

View file

@ -30,7 +30,7 @@ func ProcessOverlay(policy kubepolicy.Policy, rawResource []byte, gvk metav1.Gro
}
overlay := *rule.Mutation.Overlay
if err, _ := applyOverlay(resource, overlay, ""); err != nil {
if err, _ := applyOverlay(resource, overlay, "/"); err != nil {
//return fmt.Errorf("%s: %s", *rule.Validation.Message, err.Error())
}
}
@ -365,7 +365,13 @@ func hasNestedAnchors(overlay interface{}) bool {
return true
}
}
return false
case []interface{}:
for _, value := range typed {
if hasNestedAnchors(value) {
return true
}
}
return false
case string:
return false