Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improve background scan reports enqueue logic #5810

Merged
merged 14 commits into from
Jan 3, 2023

Conversation

eddycharly
Copy link
Member

Signed-off-by: Charles-Edouard Brétéché charles.edouard@nirmata.com

Explanation

This PR improves background scan reports enqueue logic:

  • adds a small delay when a resource event occurs to accommodate for fast changing resources like leases
  • removes the lookup when receiving a resource event
  • makes identical reports check more strict

eddycharly and others added 2 commits December 29, 2022 16:59
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
@codecov
Copy link

codecov bot commented Dec 29, 2022

Codecov Report

Merging #5810 (4086f38) into main (ffb204c) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #5810   +/-   ##
=======================================
  Coverage   35.28%   35.28%           
=======================================
  Files         190      190           
  Lines       21093    21093           
=======================================
  Hits         7442     7442           
  Misses      12834    12834           
  Partials      817      817           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@eddycharly
Copy link
Member Author

/cherry-pick release-1.9

eddycharly and others added 5 commits December 30, 2022 22:40
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
eddycharly and others added 4 commits January 2, 2023 15:25
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Copy link
Member

@realshuting realshuting left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this address the issue that the bgscan reports are generated when there's no background policy?

Previous PR: #5788
Slack conv: https://kubernetes.slack.com/archives/C032MM2CH7X/p1671917479223269

@eddycharly
Copy link
Member Author

Does this address the issue that the bgscan reports are generated when there's no background policy?

Not yet, I have other PRs coming, one will fix the issue you mention.

@realshuting
Copy link
Member

Does this address the issue that the bgscan reports are generated when there's no background policy?

Not yet, I have other PRs coming, one will fix the issue you mention.

OK, we probably need that in 1.9.0 as well.

@eddycharly
Copy link
Member Author

we probably need that in 1.9.0 as well.

Sure, it should come soon.

@realshuting realshuting enabled auto-merge (squash) January 3, 2023 11:43
@realshuting realshuting merged commit aaab55a into kyverno:main Jan 3, 2023
gcp-cherry-pick-bot bot pushed a commit that referenced this pull request Jan 3, 2023
* feat: improve background scan reports enqueue logic

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* delay

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* delay

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* aggregation delay

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* kuttl

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* kuttl timeout

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* delay

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* kuttl timeout

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
@realshuting realshuting added the cherry-pick-completed The PR was cherry-picked (or merged) to required release branches label Jan 3, 2023
realshuting pushed a commit that referenced this pull request Jan 3, 2023
* feat: improve background scan reports enqueue logic

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* delay

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* delay

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* aggregation delay

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* kuttl

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* kuttl timeout

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* delay

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* kuttl timeout

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
MdSahil-oss pushed a commit to MdSahil-oss/kyverno that referenced this pull request Jan 11, 2023
* feat: improve background scan reports enqueue logic

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* delay

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* delay

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* aggregation delay

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* kuttl

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* kuttl timeout

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* delay

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* kuttl timeout

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: MdSahil-oss <Mohdssahil1@gmail.com>
MdSahil-oss pushed a commit to MdSahil-oss/kyverno that referenced this pull request Jan 11, 2023
* feat: improve background scan reports enqueue logic

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* delay

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* delay

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* aggregation delay

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* kuttl

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* kuttl timeout

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* delay

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* kuttl timeout

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: MdSahil-oss <Mohdssahil1@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-completed The PR was cherry-picked (or merged) to required release branches cherry-pick-required milestone 1.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants