From daa9411b911e9ed059c5edf3bf43ca329f1e2e5a Mon Sep 17 00:00:00 2001 From: Erwan Miran Date: Mon, 21 Oct 2024 23:54:52 +0200 Subject: [PATCH] Make cri-dockerd log level configurable (#11646) --- roles/container-engine/cri-dockerd/defaults/main.yml | 3 +++ .../cri-dockerd/templates/cri-dockerd.service.j2 | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 roles/container-engine/cri-dockerd/defaults/main.yml diff --git a/roles/container-engine/cri-dockerd/defaults/main.yml b/roles/container-engine/cri-dockerd/defaults/main.yml new file mode 100644 index 000000000..53e337bab --- /dev/null +++ b/roles/container-engine/cri-dockerd/defaults/main.yml @@ -0,0 +1,3 @@ +--- +# Default is "info" (like if not provided). Possible values are any log level string parseable by logrus +cri_dockerd_log_level: "info" diff --git a/roles/container-engine/cri-dockerd/templates/cri-dockerd.service.j2 b/roles/container-engine/cri-dockerd/templates/cri-dockerd.service.j2 index ec128150f..df88c7dab 100644 --- a/roles/container-engine/cri-dockerd/templates/cri-dockerd.service.j2 +++ b/roles/container-engine/cri-dockerd/templates/cri-dockerd.service.j2 @@ -7,7 +7,7 @@ Requires=cri-dockerd.socket [Service] Type=notify -ExecStart={{ bin_dir }}/cri-dockerd --container-runtime-endpoint {{ cri_socket }} --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin --network-plugin=cni --pod-cidr={{ kube_pods_subnet }} --pod-infra-container-image={{ pod_infra_image_repo }}:{{ pod_infra_version }} {% if enable_dual_stack_networks %}--ipv6-dual-stack=True{% endif %} +ExecStart={{ bin_dir }}/cri-dockerd --container-runtime-endpoint {{ cri_socket }} --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin --network-plugin=cni --pod-cidr={{ kube_pods_subnet }} --pod-infra-container-image={{ pod_infra_image_repo }}:{{ pod_infra_version }} --log-level {{ cri_dockerd_log_level }} {% if enable_dual_stack_networks %}--ipv6-dual-stack=True{% endif %} ExecReload=/bin/kill -s HUP $MAINPID TimeoutSec=0