From a8e0f015ea91859163ac9befad8a6e8ac68dec9a Mon Sep 17 00:00:00 2001 From: sskaje Date: Tue, 11 Mar 2025 21:33:46 +0800 Subject: T7092: Change validators: regex to host-name|address + port + path --- data/templates/container/registries.conf.j2 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'data') diff --git a/data/templates/container/registries.conf.j2 b/data/templates/container/registries.conf.j2 index 48b3c7c4a..b5c7eed9b 100644 --- a/data/templates/container/registries.conf.j2 +++ b/data/templates/container/registries.conf.j2 @@ -30,7 +30,11 @@ 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 }}" +{% if r_options.mirror is vyos_defined %} +location = "{{ r_options.mirror.host_name if r_options.mirror.host_name is vyos_defined else r_options.mirror.address }}{{ ":" + r_options.mirror.port if r_options.mirror.port is vyos_defined }}{{ r_options.mirror.path if r_options.mirror.path is vyos_defined }}" +{% else %} +location = "{{ r }}" +{% endif %} insecure = {{ 'true' if r_options.insecure is vyos_defined else 'false' }} prefix = "{{ r }}" {% endfor %} -- cgit v1.2.3