Skip to content

Commit

Permalink
Enable parallel image pulls
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
yankcrime committed Nov 27, 2024
1 parent be3b1c1 commit e0717eb
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ spec:
name: {{ "'{{ local_hostname }}'" }}
kubeletExtraArgs:
cloud-provider: external
serialize-image-pulls: "true"
node-labels: {{- include "openstack.nodelabels.control-plane" . | nindent 12 }}
taints:
{{- include "openstack.taints.control-plane" . | nindent 8 }}
Expand All @@ -34,6 +35,7 @@ spec:
name: {{ "'{{ local_hostname }}'" }}
kubeletExtraArgs:
cloud-provider: external
serialize-image-pulls: "true"
node-labels: {{- include "openstack.nodelabels.control-plane" . | nindent 12 }}
taints:
{{- include "openstack.taints.control-plane" . | nindent 8 }}
Expand Down
13 changes: 13 additions & 0 deletions charts/cluster-api-cluster-openstack/templates/workload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,15 @@ spec:
path: {{ $file.path }}
permissions: "0600"
{{- end }}
{{- with $config := $pool.kubelet -}}
{{ $_ := set $config "apiVersion" "kubelet.config.k8s.io/v1beta1" -}}
{{ $_ := set $config "kind" "KubeletConfiguration" }}
- path: /etc/kubernetes/patches/kubeletconfiguration0+strategic.json
owner: "root:root"
permissions: "0644"
content: |
{{ $config | toJson }}
{{- end }}
joinConfiguration:
nodeRegistration:
name: {{ "'{{ local_hostname }}'" }}
Expand All @@ -115,4 +124,8 @@ spec:
node-labels: {{- include "openstack.nodelabels.workload" $context | nindent 14 }}
taints:
{{- include "openstack.taints.workload" $ | nindent 10 }}
{{- if $pool.kubelet }}
patches:
directory: /etc/kubernetes/patches
{{- end }}
{{- end }}
5 changes: 5 additions & 0 deletions charts/cluster-api-cluster-openstack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ controlPlane:
# - path: /etc/cat
# content: bWVvdw==
#
# # Additional configuration to be passed to the kubelet can be specifed here
# kubelet:
# # For example:
# serializeImagePulls: "false"
#
# # Enable or disable cluster autoscaling.
# # This object is considered immutable.
# autoscaling:
Expand Down

0 comments on commit e0717eb

Please sign in to comment.