Skip to content

Commit

Permalink
add option to enable cdi for containerd (kubernetes-sigs#10603)
Browse files Browse the repository at this point in the history
  • Loading branch information
noama-nv authored and pedromcpedro committed May 8, 2024
1 parent 6f5863f commit c239e65
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions roles/container-engine/containerd/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,6 @@ containerd_supported_distributions:
- "UnionTech"
- "UniontechOS"
- "openEuler"

# Enable container device interface
enable_cdi: false
4 changes: 4 additions & 0 deletions roles/container-engine/containerd/templates/config.toml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ oom_score = {{ containerd_oom_score }}
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 }}
{% if enable_cdi %}
enable_cdi = true
cdi_spec_dirs = ["/etc/cdi", "/var/run/cdi"]
{% endif %}
[plugins."io.containerd.grpc.v1.cri".containerd]
default_runtime_name = "{{ containerd_default_runtime | default('runc') }}"
snapshotter = "{{ containerd_snapshotter | default('overlayfs') }}"
Expand Down

0 comments on commit c239e65

Please sign in to comment.