ROX-33327: Image fetch request coalescing,improved image scan caching#19523
Draft
ROX-33327: Image fetch request coalescing,improved image scan caching#19523
Conversation
|
Skipping CI for Draft Pull Request. |
Contributor
|
Images are ready for the commit at ee70d2d. To use with deploy scripts, first |
f30251a to
864b775
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #19523 +/- ##
==========================================
- Coverage 49.25% 49.25% -0.01%
==========================================
Files 2727 2727
Lines 205788 205831 +43
==========================================
+ Hits 101362 101377 +15
- Misses 96890 96917 +27
- Partials 7536 7537 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
89e65c5 to
7825c8e
Compare
7825c8e to
ee70d2d
Compare
Contributor
Author
|
/test all |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This is the third in the series of planned optimizations for admission controller.
The goal of this PR is to optimize image fetch calls to sensor/central and ultimately registry scan requests, thus improving the throughput of the policy eval webhook, and its burst resilience and timeout avoidance, at scale.
Two optimizations have been added:
(1) request coalescing (singleflight) -- concurrent fetches for the same image share a single in-flight call;
(2) two-level caching -- the existing digest-keyed cache plus a new image-name-to-cache-key map so tag-only references can hit cached results without a digest. The name-to-key map can be disabled via
ROX_ADMISSION_CONTROL_IMAGE_NAME_CACHE_ENABLED=falsefor environments where image tags are reused for different content (mutable tags).Note to reviewers:
User-facing documentation
Testing and quality
Automated testing
How I validated my change
AdmissionControllerTest.groovyfor correctness and regression testing.Results:
https://docs.google.com/document/d/13B_1X5MPcrMB8qH076S-1QS_21CKhYEjh-YyH-vfbQM/edit?tab=t.0#heading=h.y9iqi8q2pwjt