Allows to disable the fallback to the default registry on image pull #2637
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.
Fixes #2445
Description
When one or more registry mirror(s) are defined with the 'registry-mirror' flag, if none of those mirrors can pull the image, the current behavior is to fallback to the default registry. If a whitelist (or some image restriction) is applied at the mirror side, fallbacking to the default registry makes that restriction useless. This new argument allows to skip the fallback and abort the build if the mirror do not contains or rejects an image. If it is not set, is completely transparent.
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Reviewer Notes
Release Notes
The fallback to default registry can be disabled if you defined a registry-mirror list and none of them can make pull of an image.