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: add Policy getters to Store #152

Conversation

fabriziosestito
Copy link
Contributor

Description

Adds Store::get_policy_by_uri and Store::get_policy_by_sha_prefix.
The latter takes a partial sha and returns a policy that matches.
Returns error if multiple results are found.
This behavior is similar to the docker cli, see: https://github.com/docker/engine/blob/8955d8da8951695a98eb7e15bead19d402c6eb27/daemon/container.go#L36

Test

Added integration tests.

Additional Information

Tradeoff

@fabriziosestito fabriziosestito force-pushed the feat/add_store_policy_getters branch from 667a9bc to 3172abf Compare August 31, 2023 10:02
@fabriziosestito fabriziosestito self-assigned this Aug 31, 2023
@flavio flavio marked this pull request as ready for review August 31, 2023 14:03
@flavio flavio requested a review from a team as a code owner August 31, 2023 14:03
Copy link
Member

@flavio flavio left a comment

Choose a reason for hiding this comment

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

LGTM, I left some comments that can be totally ignored

Signed-off-by: Fabrizio Sestito <[email protected]>
@fabriziosestito fabriziosestito force-pushed the feat/add_store_policy_getters branch from 3172abf to 43e53c5 Compare September 1, 2023 07:57
@fabriziosestito fabriziosestito merged commit 7416b9f into kubewarden:main Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants