1
0
Fork 0
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:
Denis Belyshev 2019-06-10 17:10:05 +03:00
parent 97be6ad379
commit c9df93ce99

View file

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