Skip to content
Snippets Groups Projects
Unverified Commit a040e521 authored by Samuel's avatar Samuel Committed by GitHub
Browse files

feat(containerd): auth support (#7868)

* feat(containerd): auth support

* fix(registry-auth): rename variable
parent dad4b26c
No related branches found
No related tags found
No related merge requests found
...@@ -32,3 +32,8 @@ ...@@ -32,3 +32,8 @@
# "docker.io": "https://registry-1.docker.io" # "docker.io": "https://registry-1.docker.io"
# containerd_max_container_log_line_size: -1 # containerd_max_container_log_line_size: -1
# containerd_registry_auth:
# - registry: 10.0.0.2:5000
# username: user
# password: pass
...@@ -70,3 +70,9 @@ containerd_fedora_repo_component: "stable" ...@@ -70,3 +70,9 @@ containerd_fedora_repo_component: "stable"
# Extra config to be put in {{ containerd_cfg_dir }}/config.toml literally # Extra config to be put in {{ containerd_cfg_dir }}/config.toml literally
containerd_extra_args: '' containerd_extra_args: ''
# Configure registry auth (if applicable to secure/insecure registries)
containerd_registry_auth: []
# - registry: 10.0.0.2:5000
# username: user
# password: pass
...@@ -46,6 +46,17 @@ oom_score = {{ containerd_oom_score }} ...@@ -46,6 +46,17 @@ oom_score = {{ containerd_oom_score }}
[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('","') }}"]
{% endfor %} {% endfor %}
{% for registry in containerd_registry_auth if registry['registry'] is defined %}
{% if (registry['username'] is defined and registry['password'] is defined) or registry['auth'] is defined %}
[plugins."io.containerd.grpc.v1.cri".registry.configs."{{ registry['registry'] }}".auth]
{% if registry['username'] is defined and registry['password'] is defined %}
password = "{{ registry['password'] }}"
username = "{{ registry['username'] }}"
{% else %}
auth = "{{ registry['auth'] }}"
{% endif %}
{% endif %}
{% endfor %}
{% if containerd_extra_args is defined %} {% if containerd_extra_args is defined %}
{{ containerd_extra_args }} {{ containerd_extra_args }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment