-
Notifications
You must be signed in to change notification settings - Fork 18
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: policy optimizer #519
Draft
flavio
wants to merge
8
commits into
kubewarden:feat-policy-optimizer
Choose a base branch
from
flavio:feat-policy-optimizer
base: feat-policy-optimizer
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
feat: policy optimizer #519
flavio
wants to merge
8
commits into
kubewarden:feat-policy-optimizer
from
flavio:feat-policy-optimizer
Conversation
This file contains 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
Move policy-server to a sub-crate. This makes possible to handle a rust project which delivers multiple binaries. Signed-off-by: Flavio Castelli <[email protected]>
Prepare the repo layout to accomodate for the policy-optimizer binary Signed-off-by: Flavio Castelli <[email protected]>
Now that we moved to a cargo workspace, the lock file is handled at the root of the workspace. Meaning `crates/policy-server/Cargo.lock` is no longer used. Signed-off-by: Flavio Castelli <[email protected]>
Update the local Dockerfile to add the policy-optimizer binary to it. Signed-off-by: Flavio Castelli <[email protected]>
Declare the shared dependencies of policy-server and policy-optimizer in a single place. Signed-off-by: Flavio Castelli <[email protected]>
Add the initial implementation of policy-optimizer. Right now the code use the Lease objects to ensure only one policy-optimizer process can write to the shared storage. Right now no real work is done, the code just enters a long sleep. This is enough to test if this approach works as we expect. Signed-off-by: Flavio Castelli <[email protected]>
Closed
Consume latest stable release of kubert, this triggers some other updates to ensure the same version of k8s-openapi is used Signed-off-by: Flavio Castelli <[email protected]>
Ensure lint tests are done against the whole workspace Signed-off-by: Flavio Castelli <[email protected]>
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 PR introduces a new cli tool called
policy-optimizer
. This binary will download the policies and optimize them. The goal is to implement what is described inside of this RFC.Currently the code doesn't do any download/optimization. It just leverages the
Lease
primitive declared by Kubernetes to ensure only one process can have write access to the directory where the optimized policies are going to be written.The actual code similates the download & optimize work with a simple
sleep
.The change is pretty invasive as you can see, I don't want to merge it in the
main
branch yet.