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:
parent
aa8c7dee29
commit
ed77ff642e
@ -37,11 +37,16 @@ Use this role on any host which should use the buildset registry.
|
|||||||
default, the user Ansible is running as.
|
default, the user Ansible is running as.
|
||||||
|
|
||||||
.. zuul:rolevar:: buildset_registry_namespaces
|
.. 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
|
The namespaces that the buildset registry supports. Each entry
|
||||||
registry will be consulted first for images in these namespaces.
|
should be a tuple with the first elemnet being the registry host
|
||||||
Any others will be fetched only from their upstream sources.
|
(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.
|
Add any local or third-party registries necessary here.
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
buildset_registry_namespaces:
|
buildset_registry_namespaces:
|
||||||
- docker.io
|
- ['docker.io', 'https://registry-1.docker.io']
|
||||||
- quay.io
|
- ['quay.io', 'https://quay.io']
|
||||||
- gcr.io
|
- ['gcr.io', 'https://gcr.io']
|
||||||
|
@ -50,7 +50,7 @@ def ansible_main():
|
|||||||
|
|
||||||
if 'registry' not in data:
|
if 'registry' not in data:
|
||||||
data['registry'] = {}
|
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, {})
|
n_config = data['registry'].setdefault(namespace, {})
|
||||||
mirrors = n_config.setdefault('mirrors', [])
|
mirrors = n_config.setdefault('mirrors', [])
|
||||||
new_loc = get_location(namespace, location)
|
new_loc = get_location(namespace, location)
|
||||||
|
@ -48,7 +48,7 @@ def ansible_main():
|
|||||||
input_data = None
|
input_data = None
|
||||||
data = {}
|
data = {}
|
||||||
|
|
||||||
unseen = set(p['namespaces'])
|
unseen = set([n[0] for n in p['namespaces']])
|
||||||
if 'registry' not in data:
|
if 'registry' not in data:
|
||||||
data['registry'] = []
|
data['registry'] = []
|
||||||
for reg in data['registry']:
|
for reg in data['registry']:
|
||||||
|
Loading…
Reference in New Issue
Block a user