Fix containerd (<1.7) configuration for insecure registries (#9207)
For the following configuration ``` containerd_insecure_registries: docker.io: - dockerhubcache.example.com ``` the rendered /etc/containerd/config.toml contains ``` [plugins."io.containerd.grpc.v1.cri".registry.configs."docker.io".tls] insecure_skip_verify = true ``` but it needs to be ``` [plugins."io.containerd.grpc.v1.cri".registry.configs."dockerhubcache.example.com".tls] insecure_skip_verify = true ```
This commit is contained in:
parent
386c739d5b
commit
8f899a1101
1 changed files with 3 additions and 1 deletions
|
@ -58,7 +58,9 @@ oom_score = {{ containerd_oom_score }}
|
||||||
{% for registry, addr in containerd_insecure_registries.items() %}
|
{% for registry, addr in containerd_insecure_registries.items() %}
|
||||||
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."{{ registry }}"]
|
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."{{ registry }}"]
|
||||||
endpoint = ["{{ ([ addr ] | flatten ) | join('","') }}"]
|
endpoint = ["{{ ([ addr ] | flatten ) | join('","') }}"]
|
||||||
[plugins."io.containerd.grpc.v1.cri".registry.configs."{{ registry }}".tls]
|
{% endfor %}
|
||||||
|
{% for addr in containerd_insecure_registries.values() | flatten | unique %}
|
||||||
|
[plugins."io.containerd.grpc.v1.cri".registry.configs."{{ addr }}".tls]
|
||||||
insecure_skip_verify = true
|
insecure_skip_verify = true
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in a new issue