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>
(cherry picked from commit 1fd31ccc28)
This commit is contained in:
Feruzjon Muyassarov
2023-09-26 18:05:25 +03:00
committed by Florian Ruynat
parent 7bd757da5f
commit b9fc4ec43e
7 changed files with 30 additions and 9 deletions

View File

@@ -270,6 +270,10 @@ deploy_container_engine: "{{ inventory_hostname in groups['k8s_cluster'] or etcd
# Container for runtime
container_manager: containerd
# Enable Node Resource Interface in containerd or CRI-O. Requires crio_version >= v1.26.0
# or containerd_version >= 1.7.0.
nri_enabled: false
# Enable Kata Containers as additional container runtime
# When enabled, it requires `container_manager` different than Docker
kata_containers_enabled: false