Add proper mirror support (#74)
* Add rewrite support and fix existing tests * Add unit tests for policy matching * Compile regexes up front and store policies in map * Add test for verify flow with mirror * Rename ImageName -> ResolvedName And only set it when necessary * Rename Rewrite -> Replacement but keep it as rewrite in the yaml
This commit is contained in:
11
test/testdata/local-policy-fail/mapping.yaml
vendored
11
test/testdata/local-policy-fail/mapping.yaml
vendored
@@ -1,11 +1,10 @@
|
||||
# map repos to policies
|
||||
version: v1
|
||||
kind: policy-mapping
|
||||
policies:
|
||||
- origin:
|
||||
domain: docker.io
|
||||
prefix: library/
|
||||
id: test-images
|
||||
- id: test-images
|
||||
description: Local test images
|
||||
files:
|
||||
- path: doi/policy.rego
|
||||
- path: policy.rego
|
||||
rules:
|
||||
- pattern: ".*"
|
||||
policy-id: test-images
|
||||
|
||||
Reference in New Issue
Block a user