From 80749d1a58bdb4527bd9fc719d271c35fb4e379f Mon Sep 17 00:00:00 2001 From: Nick Jones Date: Tue, 29 Oct 2024 12:56:02 +0000 Subject: [PATCH] Enable parallel image pulls As of 1.27, Kubernetes added support for parallelizing image pulls but this is not enabled by default. This is especially useful in situations where multiple images need to be downloaded to a host, but one of them is particularly large. --- .../templates/workload.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/charts/cluster-api-cluster-openstack/templates/workload.yaml b/charts/cluster-api-cluster-openstack/templates/workload.yaml index 165e2f1..78b5e6a 100644 --- a/charts/cluster-api-cluster-openstack/templates/workload.yaml +++ b/charts/cluster-api-cluster-openstack/templates/workload.yaml @@ -107,6 +107,16 @@ spec: path: {{ $file.path }} permissions: "0600" {{- end }} + - path: /etc/kubernetes/patches/kubeletconfiguration0+strategic.json + owner: "root:root" + permissions: "0644" + content: | + { + "apiVersion": "kubelet.config.k8s.io/v1beta1", + "kind": "KubeletConfiguration", + "serializeImagePulls": false, + "maxParallelImagePulls": 10, + } joinConfiguration: nodeRegistration: name: {{ "'{{ local_hostname }}'" }} @@ -115,4 +125,6 @@ spec: node-labels: {{- include "openstack.nodelabels.workload" $context | nindent 14 }} taints: {{- include "openstack.taints.workload" $ | nindent 10 }} + patches: + directory: /etc/kubernetes/patches {{- end }}