-
Notifications
You must be signed in to change notification settings - Fork 382
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pull-from-mirror for adding per-mirror level restrictions
Close: #1407 Add pull-from-mirror: all, digest-only, tag-only for adding per-mirror level restrictions to image pull through mirrors. The `mirror-by-digest-only` for primary is still allowed configuring, and it is honored for compatibility Signed-off-by: Qi Wang <qiwan@redhat.com>
- Loading branch information
Showing
7 changed files
with
302 additions
and
14 deletions.
There are no files selected for viewing
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
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
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
11 changes: 11 additions & 0 deletions
11
pkg/sysregistriesv2/testdata/invalid-config-level-mirror.conf
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[[registry]] | ||
prefix = "registry-a.com/foo" | ||
location = "registry-a.com/bar" | ||
pull-from-mirror = "digest-only" | ||
|
||
[[registry.mirror]] | ||
location = "mirror-1.registry-a.com" | ||
|
||
[[registry.mirror]] | ||
location = "mirror-2.registry-a.com" | ||
insecure = true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[[registry]] | ||
prefix = "registry-a.com/foo" | ||
location = "registry-a.com/bar" | ||
mirror-by-digest-only = true | ||
|
||
[[registry.mirror]] | ||
pull-from-mirror = "digest-only" | ||
location = "mirror-1.registry-a.com" | ||
|
||
[[registry.mirror]] | ||
location = "mirror-2.registry-a.com" | ||
insecure = true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[[registry]] | ||
prefix = "registry-a.com/foo" | ||
location = "registry-a.com/bar" | ||
|
||
[[registry.mirror]] | ||
pull-from-mirror = "notvalid" | ||
location = "mirror-1.registry-a.com" | ||
|
||
[[registry.mirror]] | ||
location = "mirror-2.registry-a.com" | ||
insecure = true |
86 changes: 86 additions & 0 deletions
86
pkg/sysregistriesv2/testdata/pull-sources-mirror-reference.conf
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
[[registry]] | ||
prefix = "registry-a.com/foo" | ||
location = "registry-a.com/bar" | ||
|
||
[[registry.mirror]] | ||
location = "mirror-1.registry-a.com" | ||
|
||
[[registry.mirror]] | ||
location = "mirror-2.registry-a.com" | ||
insecure = true | ||
|
||
[[registry]] | ||
prefix = "registry-b.com/foo" | ||
location = "registry-b.com/bar" | ||
|
||
[[registry.mirror]] | ||
pull-from-mirror = "digest-only" | ||
location = "mirror-1.registry-b.com" | ||
|
||
[[registry.mirror]] | ||
pull-from-mirror = "digest-only" | ||
location = "mirror-2.registry-b.com" | ||
|
||
[[registry]] | ||
prefix = "registry-c.com/foo" | ||
location = "registry-c.com/bar" | ||
|
||
[[registry.mirror]] | ||
location = "mirror-1.registry-c.com" | ||
|
||
[[registry.mirror]] | ||
pull-from-mirror = "digest-only" | ||
location = "mirror-2.registry-c.com" | ||
|
||
[[registry]] | ||
prefix = "registry-d.com/foo" | ||
location = "registry-d.com/bar" | ||
mirror-by-digest-only = true | ||
|
||
[[registry.mirror]] | ||
location = "mirror-1.registry-d.com" | ||
|
||
[[registry.mirror]] | ||
location = "mirror-2.registry-d.com" | ||
|
||
[[registry]] | ||
prefix = "registry-e.com/foo" | ||
location = "registry-e.com/bar" | ||
|
||
[[registry.mirror]] | ||
pull-from-mirror = "tag-only" | ||
location = "mirror-1.registry-e.com" | ||
|
||
[[registry.mirror]] | ||
pull-from-mirror = "tag-only" | ||
location = "mirror-2.registry-e.com" | ||
|
||
[[registry]] | ||
prefix = "registry-f.com/foo" | ||
location = "registry-f.com/bar" | ||
|
||
[[registry.mirror]] | ||
location = "mirror-1.registry-f.com" | ||
|
||
[[registry.mirror]] | ||
pull-from-mirror = "tag-only" | ||
location = "mirror-2.registry-f.com" | ||
|
||
[[registry]] | ||
prefix = "registry-g.com/foo" | ||
location = "registry-g.com/bar" | ||
|
||
[[registry.mirror]] | ||
pull-from-mirror = "digest-only" | ||
location = "mirror-1.registry-g.com" | ||
|
||
[[registry.mirror]] | ||
pull-from-mirror = "tag-only" | ||
location = "mirror-2.registry-g.com" | ||
|
||
[[registry.mirror]] | ||
location = "mirror-3.registry-g.com" | ||
|
||
[[registry.mirror]] | ||
pull-from-mirror = "all" | ||
location = "mirror-4.registry-g.com" |