mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +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() {
|
if !p.BackgroundProcessingEnabled() {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
if p.GetStatus().ValidatingAdmissionPolicy.Generated {
|
||||||
|
return false
|
||||||
|
}
|
||||||
if err := policyvalidation.ValidateVariables(p, true); err != nil {
|
if err := policyvalidation.ValidateVariables(p, true); err != nil {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue