mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
policy validation: fix assignment to entry in nil map (#7874)
Signed-off-by: AdamKorcz <adam@adalogics.com> Co-authored-by: shuting <shuting@nirmata.com>
This commit is contained in:
parent
9429e12281
commit
d4d190bbb1
1 changed files with 3 additions and 0 deletions
|
@ -1262,6 +1262,9 @@ func validateNamespaces(s *kyvernov1.Spec, path *field.Path) error {
|
|||
}
|
||||
|
||||
for i, vfa := range s.ValidationFailureActionOverrides {
|
||||
if !vfa.Action.IsValid() {
|
||||
return fmt.Errorf("invalid action")
|
||||
}
|
||||
patternList, nsList := wildcard.SeperateWildcards(vfa.Namespaces)
|
||||
|
||||
if vfa.Action.Audit() {
|
||||
|
|
Loading…
Reference in a new issue