mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-14 13:54:37 +03:00
Refactor NRI activation for containerd and CRI-O (#10470)
Refactor NRI (Node Resource Interface) activation in CRI-O and containerd. Introduce a shared variable, nri_enabled, to streamline the process. Currently, enabling NRI requires a separate update of defaults for each container runtime independently, without any verification of NRI support for the specific version of containerd or CRI-O in use. With this commit, the previous approach is replaced. Now, a single variable, nri_enabled, handles this functionality. Also, this commit separates the responsibility of verifying NRI supported versions of containerd and CRI-O from cluster administrators, and leaves it to Ansible. Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@intel.com>
This commit is contained in:
committed by
GitHub
parent
6f520eacf7
commit
1fd31ccc28
@@ -64,9 +64,6 @@ containerd_enable_unprivileged_ports: false
|
||||
# If enabled it will allow non root users to use icmp sockets
|
||||
containerd_enable_unprivileged_icmp: false
|
||||
|
||||
# If enabled, it will activate the NRI support in containerd
|
||||
containerd_nri_disable: true
|
||||
|
||||
containerd_cfg_dir: /etc/containerd
|
||||
|
||||
# Extra config to be put in {{ containerd_cfg_dir }}/config.toml literally
|
||||
|
||||
@@ -78,8 +78,10 @@ oom_score = {{ containerd_oom_score }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if nri_enabled and containerd_version >= 1.7.0 %}
|
||||
[plugins."io.containerd.nri.v1.nri"]
|
||||
disable = {{ containerd_nri_disable | default(true) | lower }}
|
||||
disable = false
|
||||
{% endif %}
|
||||
|
||||
{% if containerd_extra_args is defined %}
|
||||
{{ containerd_extra_args }}
|
||||
|
||||
Reference in New Issue
Block a user