Skip to content

Commit

Permalink
Add options to control images pulling of kubelet
Browse files Browse the repository at this point in the history
Signed-off-by: tu1h <[email protected]>
  • Loading branch information
tu1h committed Apr 17, 2024
1 parent f3065cc commit 2f3ca71
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@ 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_serialize_image_pulls* - If `true`, the Kubelet pulls images one at a time. We recommend not set to false on nodes that an Aufs storage backend.

* *kubelet_max_parallel_image_pulls* - Sets the maximum number of image pulls in parallel. This field cannot be set if *kubelet_serialize_image_pulls* is true. Setting it to `nil` means no limit.

* *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/)
Expand Down
5 changes: 5 additions & 0 deletions roles/kubernetes/node/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -263,3 +263,8 @@ conntrack_modules:
kubelet_tracing: false
kubelet_tracing_endpoint: 0.0.0.0:4317
kubelet_tracing_sampling_rate_per_million: 100

# Whether pull images one at a time
kubelet_serialize_image_pulls: true
# The maximum number of image pulls in parallel. This option take effect if kubelet_serialize_image_pulls is false
kubelet_max_parallel_image_pulls: 5
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,8 @@ topologyManagerScope: {{ kubelet_topology_manager_scope }}
tracing:
endpoint: {{ kubelet_tracing_endpoint }}
samplingRatePerMillion: {{ kubelet_tracing_sampling_rate_per_million }}
{% endif %}
serializeImagePulls: {{ kubelet_serialize_image_pulls | bool | lower }}
{% not kubelet_serialize_image_pulls %}
maxParallelImagePulls: {{ kubelet_max_parallel_image_pulls }}
{% endif %}

0 comments on commit 2f3ca71

Please sign in to comment.