policy-test: use local registry - #2583
Draft
davidweisse wants to merge 1 commit into
Draft
Conversation
davidweisse
force-pushed
the
dav/suite-local-registry
branch
from
August 12, 2026 10:54
fc7a027 to
1f0f237
Compare
davidweisse
force-pushed
the
dav/policy-test-suite
branch
3 times, most recently
from
August 19, 2026 11:12
ecd4a47 to
7c9e278
Compare
davidweisse
force-pushed
the
dav/suite-local-registry
branch
from
August 19, 2026 12:17
1f0f237 to
15decf2
Compare
Member
Author
|
Update: Instead of the weird proxy setup, we can dynamically overwrite the pause image in the genpolicy settings file before running Also, with the rebase, the rego evaluation timing goes down to <10ms (~10-20ms max for |
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.
This uses the
--insecure-registryflag from #2580 to configure a local registry viacrane registry serveduring the policy test suite evaluation. To use this, first runjust policy-registryand wait until it saysRegistry is ready.. Then runjust policy. The first target will start a local registry viacrane registry serveand push the needed images into it while also writing to the image replacements file.One problem is: genpolicy also pulls the configured pause image (ghcr.io/edgelesssys/kuberenetes/pause:3.6 in our case), which cannot be replaced by the image replacements file, since it isn't present in any of the deployment YAMLs. We configure
ghcr.ioas an insecure registry and set up an HTTP proxy that reroutes requests toghcr.ioto the local registry. For this to work, we of course push the pause image to the local registry beforehand.Doing some testing, I get the following results:
Fixes CON-251
This PR is currently rebased on both #2580 and #2582, so only the most recent commit is relevant.