Override the default value of containerd's root, state, and oom_score (#7622)

* Override the default value of containerd's root, state, and oom_score configurations

* Add tests data for containerd_storage_dir, containerd_state_dir and containerd_oom_score variables
pull/7626/head
Fatih Sarhan 2021-05-19 18:24:53 +03:00 committed by GitHub
parent 26c1d42fff
commit 59fc17f4e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 0 deletions

View File

@ -1,6 +1,10 @@
--- ---
# Please see roles/container-engine/containerd/defaults/main.yml for more configuration options # Please see roles/container-engine/containerd/defaults/main.yml for more configuration options
# containerd_storage_dir: "/var/lib/containerd"
# containerd_state_dir: "/run/containerd"
# containerd_oom_score: 0
# containerd_default_runtime: "runc" # containerd_default_runtime: "runc"
# containerd_snapshotter: "native" # containerd_snapshotter: "native"

View File

@ -1,4 +1,7 @@
--- ---
containerd_storage_dir: "/var/lib/containerd"
containerd_state_dir: "/run/containerd"
containerd_oom_score: 0
containerd_default_runtime: "runc" containerd_default_runtime: "runc"
# containerd_snapshotter: "native" # containerd_snapshotter: "native"

View File

@ -1,4 +1,7 @@
version = 2 version = 2
root = "{{ containerd_storage_dir }}"
state = "{{ containerd_state_dir }}"
oom_score = {{ containerd_oom_score }}
[grpc] [grpc]
max_recv_message_size = {{ containerd_grpc_max_recv_message_size | default(16777216) }} max_recv_message_size = {{ containerd_grpc_max_recv_message_size | default(16777216) }}

View File

@ -39,3 +39,8 @@ tls_cipher_suites:
etcd_tls_cipher_suites: etcd_tls_cipher_suites:
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 - TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 - TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
# Containerd
containerd_storage_dir: /var/data/containerd
containerd_state_dir: /run/cri/containerd
containerd_oom_score: -999