use-buildset-registry: add URL to buildset_registry_namespaces

This is a no-op change for the current setup, but the URL is required
to build config files for containerd passthrough setup in a follow-on
change.

Change-Id: Iacbb08a6bf4a22bb6b91ffa781267a5eda106d48
This commit is contained in:
Ian Wienand 2022-12-13 06:36:43 +11:00 committed by James E. Blair
parent aa8c7dee29
commit ed77ff642e
4 changed files with 14 additions and 9 deletions

View File

@ -37,11 +37,16 @@ Use this role on any host which should use the buildset registry.
default, the user Ansible is running as.
.. zuul:rolevar:: buildset_registry_namespaces
:default: ['docker.io', 'quay.io', 'gcr.io']
:default: [ ('docker.io', 'https://...'), ('quay.io', ...), ('gcr.io', ...)]
The namespaces that the buildset registry supports. The buildset
registry will be consulted first for images in these namespaces.
Any others will be fetched only from their upstream sources.
The namespaces that the buildset registry supports. Each entry
should be a tuple with the first elemnet being the registry host
(usually the internet domain name) and the second being the URL the
registry is hosted at.
The buildset registry will be consulted first for images in these
namespaces. Any others will be fetched only from their upstream
sources.
Add any local or third-party registries necessary here.

View File

@ -1,4 +1,4 @@
buildset_registry_namespaces:
- docker.io
- quay.io
- gcr.io
- ['docker.io', 'https://registry-1.docker.io']
- ['quay.io', 'https://quay.io']
- ['gcr.io', 'https://gcr.io']

View File

@ -50,7 +50,7 @@ def ansible_main():
if 'registry' not in data:
data['registry'] = {}
for namespace in set(p['namespaces']):
for namespace in set([n[0] for n in p['namespaces']]):
n_config = data['registry'].setdefault(namespace, {})
mirrors = n_config.setdefault('mirrors', [])
new_loc = get_location(namespace, location)

View File

@ -48,7 +48,7 @@ def ansible_main():
input_data = None
data = {}
unseen = set(p['namespaces'])
unseen = set([n[0] for n in p['namespaces']])
if 'registry' not in data:
data['registry'] = []
for reg in data['registry']: