diff options
author | sskaje <sskaje@gmail.com> | 2025-01-27 11:41:08 +0800 |
---|---|---|
committer | sskaje <sskaje@gmail.com> | 2025-02-09 21:04:51 +0800 |
commit | 1dc3e8e87fd6ac14ce9b15cfea0045b8c7cee981 (patch) | |
tree | bdc6b986f68028b17430b1ff82b2b3fb245bced6 | |
parent | 38dacfeb8fb66d135f8ad219ff3c2fc7504f3029 (diff) | |
download | vyos-1x-1dc3e8e87fd6ac14ce9b15cfea0045b8c7cee981.tar.gz vyos-1x-1dc3e8e87fd6ac14ce9b15cfea0045b8c7cee981.zip |
T7092: Add Container Registry Mirror
-rw-r--r-- | data/templates/container/registries.conf.j2 | 6 | ||||
-rw-r--r-- | interface-definitions/container.xml.in | 11 |
2 files changed, 17 insertions, 0 deletions
diff --git a/data/templates/container/registries.conf.j2 b/data/templates/container/registries.conf.j2 index eb7ff8775..48b3c7c4a 100644 --- a/data/templates/container/registries.conf.j2 +++ b/data/templates/container/registries.conf.j2 @@ -28,4 +28,10 @@ {% set _ = registry_list.append(r) %} {% endfor %} unqualified-search-registries = {{ registry_list }} +{% for r, r_options in registry.items() if r_options.disable is not vyos_defined %} +[[registry]] +location = "{{ r_options.mirror if r_options.mirror is vyos_defined else r }}" +insecure = {{ 'true' if r_options.insecure is vyos_defined else 'false' }} +prefix = "{{ r }}" +{% endfor %} {% endif %} diff --git a/interface-definitions/container.xml.in b/interface-definitions/container.xml.in index 04318a7c9..8752f5f4d 100644 --- a/interface-definitions/container.xml.in +++ b/interface-definitions/container.xml.in @@ -538,6 +538,17 @@ <children> #include <include/interface/authentication.xml.i> #include <include/generic-disable-node.xml.i> + <leafNode name="insecure"> + <properties> + <help>Use HTTP instead of HTTPS</help> + <valueless/> + </properties> + </leafNode> + <leafNode name="mirror"> + <properties> + <help>Registry mirror, use host:port</help> + </properties> + </leafNode> </children> </tagNode> </children> |