1
0
Fork 0
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:
Mariam Fahmy 2023-09-12 14:08:28 +03:00 committed by GitHub
parent a5198e78a9
commit 9b0e6b6e9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
}