mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-31 03:45:17 +00:00
Added merge of results in map validation logic
This commit is contained in:
parent
97be6ad379
commit
c9df93ce99
1 changed files with 1 additions and 4 deletions
|
@ -105,10 +105,7 @@ func validateMap(resourceMap, patternMap map[string]interface{}, path string) re
|
|||
res.FailWithMessagef("Field %s is not present", key)
|
||||
} else {
|
||||
elementResult := validateResourceElement(resourceMap[key], patternElement, path+key+"/")
|
||||
if result.Failed == elementResult.Reason {
|
||||
res.Reason = elementResult.Reason
|
||||
res.Messages = append(res.Messages, elementResult.Messages...)
|
||||
}
|
||||
res.MergeWith(&elementResult)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue