From af0fea3b37aaa2411b2f349b8255b29facb88f50 Mon Sep 17 00:00:00 2001 From: tu1h Date: Wed, 17 Apr 2024 14:57:24 +0800 Subject: [PATCH] Add options to control images pulling of kubelet Signed-off-by: tu1h --- docs/ansible/vars.md | 2 ++ roles/kubernetes/node/templates/kubelet-config.v1beta1.yaml.j2 | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/ansible/vars.md b/docs/ansible/vars.md index c2cdaa099d9..7619d6b1e6a 100644 --- a/docs/ansible/vars.md +++ b/docs/ansible/vars.md @@ -216,6 +216,8 @@ Stack](https://github.com/kubernetes-sigs/kubespray/blob/master/docs/dns-stack.m The percent is calculated by dividing this field value by 100, so the field value must be between 0 and 100, inclusive. When specified, the value must be less than imageGCHighThresholdPercent. Default: 80 +* *kubelet_max_parallel_image_pulls* - Sets the maximum number of image pulls in parallel. This field is null by default which means the default is serial image pulling, set it to a integer great than 1 to enable image pulling in parallel. + * *kubelet_make_iptables_util_chains* - If `true`, causes the kubelet ensures a set of `iptables` rules are present on host. * *kubelet_cpu_manager_policy* - If set to `static`, allows pods with certain resource characteristics to be granted increased CPU affinity and exclusivity on the node. And it should be set with `kube_reserved` or `system-reserved`, enable this with the following guide:[Control CPU Management Policies on the Node](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/) diff --git a/roles/kubernetes/node/templates/kubelet-config.v1beta1.yaml.j2 b/roles/kubernetes/node/templates/kubelet-config.v1beta1.yaml.j2 index 1a664a0edf7..a4d14af66de 100644 --- a/roles/kubernetes/node/templates/kubelet-config.v1beta1.yaml.j2 +++ b/roles/kubernetes/node/templates/kubelet-config.v1beta1.yaml.j2 @@ -174,4 +174,5 @@ topologyManagerScope: {{ kubelet_topology_manager_scope }} tracing: endpoint: {{ kubelet_tracing_endpoint }} samplingRatePerMillion: {{ kubelet_tracing_sampling_rate_per_million }} -{% endif %} \ No newline at end of file +{% endif %} +maxParallelImagePulls: {{ kubelet_max_parallel_image_pulls | default('null') }}