mirror of
https://github.com/kyverno/kyverno.git
synced 2025-04-08 18:15:48 +00:00
fix: Stop incorrect any block condition logging (#4107)
Previously the "no condition passed for 'any' block" would be logged for all `any` blocks because the log line always occurs, even if conditions are found. Co-authored-by: Samuel Torres <samuel.torres@form3.tech> Signed-off-by: Andrew Bulford <andrew.bulford@form3.tech> Co-authored-by: Prateek Pandey <prateek.pandey@nirmata.com>
This commit is contained in:
parent
051b0751e0
commit
11942560c3
1 changed files with 3 additions and 1 deletions
|
@ -53,7 +53,9 @@ func evaluateAnyAllConditions(log logr.Logger, ctx context.EvalInterface, condit
|
|||
}
|
||||
}
|
||||
|
||||
log.Info("no condition passed for 'any' block", "any", anyConditions)
|
||||
if !anyConditionsResult {
|
||||
log.Info("no condition passed for 'any' block", "any", anyConditions)
|
||||
}
|
||||
}
|
||||
|
||||
// update the allConditionsResult if they are present
|
||||
|
|
Loading…
Add table
Reference in a new issue