mirror of
https://github.com/kyverno/kyverno.git
synced 2025-04-08 10:04:25 +00:00
fix: Swap any/all in the error message. (#7688)
Signed-off-by: JaeHeung Han <hylowaker@users.noreply.github.com> Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
parent
5b9c13ad00
commit
1cf9f43b8b
1 changed files with 2 additions and 2 deletions
|
@ -67,7 +67,7 @@ func hasUserMatchExclude(idx int, rule *kyvernov1.Rule) error {
|
|||
if len(rule.ExcludeResources.All) > 0 {
|
||||
for i, value := range rule.ExcludeResources.All {
|
||||
if path := userInfoDefined(value.UserInfo); path != "" {
|
||||
return fmt.Errorf("invalid variable used at path: spec/rules[%d]/exclude/any[%d]/%s", idx, i, path)
|
||||
return fmt.Errorf("invalid variable used at path: spec/rules[%d]/exclude/all[%d]/%s", idx, i, path)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ func hasUserMatchExclude(idx int, rule *kyvernov1.Rule) error {
|
|||
if len(rule.ExcludeResources.Any) > 0 {
|
||||
for i, value := range rule.ExcludeResources.Any {
|
||||
if path := userInfoDefined(value.UserInfo); path != "" {
|
||||
return fmt.Errorf("invalid variable used at path: spec/rules[%d]/exclude/all[%d]/%s", idx, i, path)
|
||||
return fmt.Errorf("invalid variable used at path: spec/rules[%d]/exclude/any[%d]/%s", idx, i, path)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue