mirror of
https://github.com/kyverno/kyverno.git
synced 2025-04-08 10:04:25 +00:00
Fix skipped policy message is displayed even if variable is passed (#2446)
This commit is contained in:
parent
6a81bb7cc3
commit
5273a7fa7b
1 changed files with 1 additions and 4 deletions
|
@ -334,7 +334,7 @@ func applyPoliciesFromPath(fs billy.Filesystem, policyBytes []byte, valuesFile s
|
|||
}
|
||||
|
||||
fmt.Printf("\nExecuting %s...", values.Name)
|
||||
|
||||
valuesFile = values.Variables
|
||||
variables, globalValMap, valuesMap, namespaceSelectorMap, err := common.GetVariable(variablesString, values.Variables, fs, isGit, policyResourcePath)
|
||||
if err != nil {
|
||||
if !sanitizederror.IsErrorSanitized(err) {
|
||||
|
@ -384,9 +384,6 @@ func applyPoliciesFromPath(fs billy.Filesystem, policyBytes []byte, valuesFile s
|
|||
fmt.Printf("\napplying %s to %s... \n", msgPolicies, msgResources)
|
||||
}
|
||||
|
||||
if variablesString != "" {
|
||||
variables = common.SetInStoreContext(mutatedPolicies, variables)
|
||||
}
|
||||
for _, policy := range mutatedPolicies {
|
||||
err := policy2.Validate(policy, nil, true, openAPIController)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Reference in a new issue