diff --git a/roles/container-engine/containerd/defaults/main.yml b/roles/container-engine/containerd/defaults/main.yml index 871994337957aad18219cf3d755cce180e3d097b..b512b0da35d0dc06569f4a3d6946779b6c4c4334 100644 --- a/roles/container-engine/containerd/defaults/main.yml +++ b/roles/container-engine/containerd/defaults/main.yml @@ -1,4 +1,9 @@ --- +# The root directory for containerd metadata +containerd_metadata_root_dir: /var/lib/containerd +# The state directory for containerd +containerd_state_dir: /run/containerd + containerd_config: grpc: max_recv_message_size: 16777216 diff --git a/roles/container-engine/containerd/templates/config.toml.j2 b/roles/container-engine/containerd/templates/config.toml.j2 index e2cc50bbf46f001d820cbf1df046e17360705d26..9ed28ef5392ed82a6877258b09b1709e45942b11 100644 --- a/roles/container-engine/containerd/templates/config.toml.j2 +++ b/roles/container-engine/containerd/templates/config.toml.j2 @@ -1,3 +1,8 @@ +# persistent data location +root = "{{ containerd_metadata_root_dir }}" +# runtime state information +state = "{{ containerd_state_dir }}" + # Kubernetes doesn't use containerd restart manager. disabled_plugins = ["restart"] diff --git a/tests/files/packet_centos7-flannel-containerd-addons-ha.yml b/tests/files/packet_centos7-flannel-containerd-addons-ha.yml index fa5fff1a7129140b1ecc55bb18aa063b5dd3f442..88bd92defc7b576e3dda601cc629ab55f2e2d2d5 100644 --- a/tests/files/packet_centos7-flannel-containerd-addons-ha.yml +++ b/tests/files/packet_centos7-flannel-containerd-addons-ha.yml @@ -38,3 +38,7 @@ tls_cipher_suites: etcd_tls_cipher_suites: - TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 - TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 + +# Containerd path +containerd_metadata_root_dir: /var/data/containerd +containerd_state_dir: /run/cri/containerd