feat: allow for custom registry
This patch adds a simple CLI which can mirror all the images needed
as well as allow for simple override for `atmosphere_image_repository`
for all images.
diff --git a/roles/containerd/defaults/main.yml b/roles/containerd/defaults/main.yml
index 2b742d1..60d4249 100644
--- a/roles/containerd/defaults/main.yml
+++ b/roles/containerd/defaults/main.yml
@@ -17,3 +17,5 @@
containerd_pause_image: k8s.gcr.io/pause:3.5
# ]]]
+
+containerd_insecure_registries: []
diff --git a/roles/containerd/templates/config.toml.j2 b/roles/containerd/templates/config.toml.j2
index 84cad6d..16c0ae1 100644
--- a/roles/containerd/templates/config.toml.j2
+++ b/roles/containerd/templates/config.toml.j2
@@ -3,3 +3,14 @@
[plugins]
[plugins."io.containerd.grpc.v1.cri"]
sandbox_image = "{{ containerd_pause_image }}"
+ [plugins."io.containerd.grpc.v1.cri".registry]
+ [plugins."io.containerd.grpc.v1.cri".registry.mirrors]
+ {% for registry in containerd_insecure_registries %}
+ [plugins."io.containerd.grpc.v1.cri".registry.mirrors."{{ registry }}"]
+ endpoint = ["http://{{ registry }}"]
+ {% endfor %}
+ [plugins."io.containerd.grpc.v1.cri".registry.configs]
+ {% for registry in containerd_insecure_registries %}
+ [plugins."io.containerd.grpc.v1.cri".registry.configs."{{ registry }}".tls]
+ insecure_skip_verify = true
+ {% endfor %}