mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-28 02:18:15 +00:00
fix: ignore generating backgroundscan reports for Kyverno policies in case VAPs are generated (#8356)
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
This commit is contained in:
parent
a5198e78a9
commit
9b0e6b6e9e
1 changed files with 3 additions and 0 deletions
|
@ -19,6 +19,9 @@ func CanBackgroundProcess(p kyvernov1.PolicyInterface) bool {
|
|||
if !p.BackgroundProcessingEnabled() {
|
||||
return false
|
||||
}
|
||||
if p.GetStatus().ValidatingAdmissionPolicy.Generated {
|
||||
return false
|
||||
}
|
||||
if err := policyvalidation.ValidateVariables(p, true); err != nil {
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue