Skip to content

Commit

Permalink
add containerd registry mirror certificate configuration
Browse files Browse the repository at this point in the history
Signed-off-by: KubeKyrie <[email protected]>
  • Loading branch information
KubeKyrie committed Jan 6, 2025
1 parent 57490d5 commit b231d30
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions roles/container-engine/containerd/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ containerd_registries_mirrors:
- host: https://registry-1.docker.io
capabilities: ["pull", "resolve"]
skip_verify: false
# ca: ["/etc/certs/mirror.pem"]
# client: ["/etc/certs/client-1.pem", "/etc/certs/client-2.pem"]

containerd_max_container_log_line_size: 16384

Expand Down
6 changes: 6 additions & 0 deletions roles/container-engine/containerd/templates/hosts.toml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@ server = "{{ item.server | default("https://" + item.prefix) }}"
capabilities = ["{{ ([ mirror.capabilities ] | flatten ) | join('","') }}"]
skip_verify = {{ mirror.skip_verify | default('false') | string | lower }}
override_path = {{ mirror.override_path | default('false') | string | lower }}
{% if mirror.ca is defined %}
ca = ["{{ ([ mirror.ca ] | flatten ) | join('","') }}"]
{% endif %}
{% if mirror.client is defined %}
client = ["{{ ([ mirror.client ] | flatten ) | join('","') }}"]
{% endif %}
{% endfor %}

0 comments on commit b231d30

Please sign in to comment.