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:
parent
cc5e556631
commit
7052d4bb93
1 changed files with 8 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue