Container Registry: Allow toggling redirects to storage backends on a per-repository basis
Summary
We need to add a new exceptions
parameter to the registry configuration file under storage > redirect
, where admins can maintain a list of regular expressions. Blob download requests for repositories whose path matches one of these regular expressions would not be redirected to the storage backend but rather be served by the registry. Essentially a redirect bypass.
Please see gitlab-org/container-registry#233 (closed) for additional context.
Current behavior
(What you're experiencing happening)
Expected behavior
The registry configuration file (truncated) will look like this:
storage:
redirect: # This section is not new, but I believe it's not included yet (the only parameter so far was `disable`, which defaults to `false`)
exceptions: # New section
- group-a/project-a.* # Example: bypass for repository `project-a` within group `group-a`, and any sub repositories it might have
- group-b/.* # Example: bypass for any repositories within group `group-b`