mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-09 02:17:39 -02:30
cri-o registry auth support (#7837)
* cri-o registry auth support * yaml lint for comments * crio_registry_auth from registry_auth * crio_registry_auth as defaults
This commit is contained in:
committed by
GitHub
parent
e1967b0700
commit
81bf4f9304
17
roles/container-engine/cri-o/templates/config.json.j2
Normal file
17
roles/container-engine/cri-o/templates/config.json.j2
Normal file
@@ -0,0 +1,17 @@
|
||||
{% if crio_registry_auth is defined and crio_registry_auth|length %}
|
||||
{
|
||||
{% for reg in crio_registry_auth %}
|
||||
"auths": {
|
||||
"{{ reg.registry }}": {
|
||||
"auth": "{{ (reg.username + ':' + reg.password) | string | b64encode }}"
|
||||
}
|
||||
{% if not loop.last %}
|
||||
},
|
||||
{% else %}
|
||||
}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
}
|
||||
{% else %}
|
||||
{}
|
||||
{% endif %}
|
||||
@@ -313,7 +313,7 @@ default_transport = "docker://"
|
||||
|
||||
# The path to a file containing credentials necessary for pulling images from
|
||||
# secure registries. The file is similar to that of /var/lib/kubelet/config.json
|
||||
global_auth_file = ""
|
||||
global_auth_file = "/etc/crio/config.json"
|
||||
|
||||
# The image used to instantiate infra containers.
|
||||
# This option supports live configuration reload.
|
||||
|
||||
Reference in New Issue
Block a user