mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-01-29 15:24:46 -03:30
* [containerd] Add Configuration option for Node Resource Interface Node Resource Interface (NRI) is a common is a common framework for plugging domain or vendor-specific custom logic into container runtime like containerd. With this commit, we introduce the containerd_disable_nri configuration flag, providing cluster administrators the flexibility to opt in or out (defaulted to 'out') of this feature in containerd. In line with containerd's default configuration, NRI is disabled by default in this containerd role defaults. Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@intel.com> * [cri-o] Add configuration option for Node Resource Interface Node Resource Interface (NRI) is a common is a common framework for plugging domain or vendor-specific custom logic into container runtimes like containerd/crio. With this commit, we introduce the crio_enable_nri configuration flag, providing cluster administrators the flexibility to opt in or out (defaulted to 'out') of this feature in cri-o runtime. In line with crio's default configuration, NRI is disabled by default in this cri-o role defaults. Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@intel.com> --------- Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@intel.com> (cherry picked from commit f964b3438d024e27f226f55db3e5f66dcfdb6c34)
87 lines
3.9 KiB
Django/Jinja
87 lines
3.9 KiB
Django/Jinja
version = 2
|
|
root = "{{ containerd_storage_dir }}"
|
|
state = "{{ containerd_state_dir }}"
|
|
oom_score = {{ containerd_oom_score }}
|
|
|
|
[grpc]
|
|
max_recv_message_size = {{ containerd_grpc_max_recv_message_size | default(16777216) }}
|
|
max_send_message_size = {{ containerd_grpc_max_send_message_size | default(16777216) }}
|
|
|
|
[debug]
|
|
level = "{{ containerd_debug_level | default('info') }}"
|
|
|
|
[metrics]
|
|
address = "{{ containerd_metrics_address | default('') }}"
|
|
grpc_histogram = {{ containerd_metrics_grpc_histogram | default(false) | lower }}
|
|
|
|
[plugins]
|
|
[plugins."io.containerd.grpc.v1.cri"]
|
|
sandbox_image = "{{ pod_infra_image_repo }}:{{ pod_infra_image_tag }}"
|
|
max_container_log_line_size = {{ containerd_max_container_log_line_size }}
|
|
enable_unprivileged_ports = {{ containerd_enable_unprivileged_ports | default(false) | lower }}
|
|
enable_unprivileged_icmp = {{ containerd_enable_unprivileged_icmp | default(false) | lower }}
|
|
[plugins."io.containerd.grpc.v1.cri".containerd]
|
|
default_runtime_name = "{{ containerd_default_runtime | default('runc') }}"
|
|
snapshotter = "{{ containerd_snapshotter | default('overlayfs') }}"
|
|
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes]
|
|
{% for runtime in [containerd_runc_runtime] + containerd_additional_runtimes %}
|
|
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.{{ runtime.name }}]
|
|
runtime_type = "{{ runtime.type }}"
|
|
runtime_engine = "{{ runtime.engine }}"
|
|
runtime_root = "{{ runtime.root }}"
|
|
{% if runtime.base_runtime_spec is defined %}
|
|
base_runtime_spec = "{{ containerd_cfg_dir }}/{{ runtime.base_runtime_spec }}"
|
|
{% endif %}
|
|
|
|
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.{{ runtime.name }}.options]
|
|
{% for key, value in runtime.options.items() %}
|
|
{{ key }} = {{ value }}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
{% if kata_containers_enabled %}
|
|
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.kata-qemu]
|
|
runtime_type = "io.containerd.kata-qemu.v2"
|
|
{% endif %}
|
|
{% if gvisor_enabled %}
|
|
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runsc]
|
|
runtime_type = "io.containerd.runsc.v1"
|
|
{% endif %}
|
|
[plugins."io.containerd.grpc.v1.cri".registry]
|
|
{% if containerd_use_config_path is defined and containerd_use_config_path|bool %}
|
|
config_path = "{{ containerd_cfg_dir }}/certs.d"
|
|
{% else %}
|
|
[plugins."io.containerd.grpc.v1.cri".registry.mirrors]
|
|
{% set insecure_registries_addr = [] %}
|
|
{% for registry in containerd_registries_mirrors %}
|
|
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."{{ registry.prefix }}"]
|
|
{% set endpoint = [] %}
|
|
{% for mirror in registry.mirrors %}
|
|
{% if endpoint.append(mirror.host) %}{% endif %}
|
|
{% if mirror.skip_verify is defined and mirror.skip_verify|bool %}{% if insecure_registries_addr.append(mirror.host | urlsplit('netloc')) %}{% endif %}{% endif %}
|
|
{% endfor %}
|
|
endpoint = ["{{ ( endpoint | unique ) | join('","') }}"]
|
|
{% endfor %}
|
|
{% for addr in insecure_registries_addr | unique %}
|
|
[plugins."io.containerd.grpc.v1.cri".registry.configs."{{ addr }}".tls]
|
|
insecure_skip_verify = true
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% 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 %}
|
|
|
|
[plugins."io.containerd.nri.v1.nri"]
|
|
disable = {{ containerd_nri_disable | default(true) | lower }}
|
|
|
|
{% if containerd_extra_args is defined %}
|
|
{{ containerd_extra_args }}
|
|
{% endif %}
|