mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-19 23:07:47 -02:30
Update configuration of registries in cri-o (#7852)
* Update configuration of registries in cri-o * Update docs to match new registry configuration
This commit is contained in:
@@ -338,31 +338,10 @@ pause_command = "/pause"
|
||||
# refer to containers-policy.json(5) for more details.
|
||||
signature_policy = "{{ crio_signature_policy }}"
|
||||
|
||||
# List of registries to skip TLS verification for pulling images. Please
|
||||
# consider configuring the registries via /etc/containers/registries.conf before
|
||||
# changing them here.
|
||||
insecure_registries = [
|
||||
{% for insecure_registry in crio_insecure_registries %}
|
||||
"{{ insecure_registry }}",
|
||||
{% endfor %}
|
||||
]
|
||||
|
||||
# Controls how image volumes are handled. The valid values are mkdir, bind and
|
||||
# ignore; the latter will ignore volumes entirely.
|
||||
image_volumes = "mkdir"
|
||||
|
||||
# List of registries to be used when pulling an unqualified image (e.g.,
|
||||
# "alpine:latest"). By default, registries is set to "docker.io" for
|
||||
# compatibility reasons. Depending on your workload and usecase you may add more
|
||||
# registries (e.g., "quay.io", "registry.fedoraproject.org",
|
||||
# "registry.opensuse.org", etc.).
|
||||
registries = [
|
||||
{% for registry in crio_registries %}
|
||||
"{{ registry }}",
|
||||
{% endfor %}
|
||||
]
|
||||
|
||||
|
||||
# The crio.network table containers settings pertaining to the management of
|
||||
# CNI plugins.
|
||||
[crio.network]
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
[[registry]]
|
||||
prefix = "{{ item.prefix }}"
|
||||
insecure = {{ item.insecure | d('false') | string | lower }}
|
||||
blocked = {{ item.blocked | d('false') | string | lower }}
|
||||
location = "{{ item.location | d(item.prefix) }}"
|
||||
{% for mirror in item.mirrors %}
|
||||
|
||||
[[registry.mirror]]
|
||||
location = "{{ mirror.location }}"
|
||||
insecure = {{ mirror.insecure | d ('false') | string | lower }}
|
||||
{% endfor %}
|
||||
13
roles/container-engine/cri-o/templates/registry.conf.j2
Normal file
13
roles/container-engine/cri-o/templates/registry.conf.j2
Normal file
@@ -0,0 +1,13 @@
|
||||
[[registry]]
|
||||
prefix = "{{ item.prefix | default(item.location) }}"
|
||||
insecure = {{ item.insecure | default('false') | string | lower }}
|
||||
blocked = {{ item.blocked | default('false') | string | lower }}
|
||||
location = "{{ item.location }}"
|
||||
{% if item.mirrors is defined %}
|
||||
{% for mirror in item.mirrors %}
|
||||
|
||||
[[registry.mirror]]
|
||||
location = "{{ mirror.location }}"
|
||||
insecure = {{ mirror.insecure | default('false') | string | lower }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
10
roles/container-engine/cri-o/templates/unqualified.conf.j2
Normal file
10
roles/container-engine/cri-o/templates/unqualified.conf.j2
Normal file
@@ -0,0 +1,10 @@
|
||||
{%- set _unqualified_registries = [] -%}
|
||||
{% for _registry in crio_registries if _registry.unqualified -%}
|
||||
{% if _registry.prefix is defined -%}
|
||||
{{ _unqualified_registries.append(_registry.prefix) }}
|
||||
{% else %}
|
||||
{{ _unqualified_registries.append(_registry.location) }}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
|
||||
unqualified-search-registries = {{ _unqualified_registries | to_yaml }}
|
||||
Reference in New Issue
Block a user