Skip to content

Commit 15b0c74

Browse files
authored
Merge pull request #17772 from hakman/automated-cherry-pick-of-#17755-upstream-release-1.34
Automated cherry pick of #17755: Include maxParallelImagePulls field in Kubelet config
2 parents 0f3f838 + d8e1320 commit 15b0c74

12 files changed

+60
-0
lines changed

k8s/crds/kops.k8s.io_clusters.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4364,6 +4364,14 @@ spec:
43644364
description: LogLevel is the logging level of the kubelet
43654365
format: int32
43664366
type: integer
4367+
maxParallelImagePulls:
4368+
description: |-
4369+
MaxParallelImagePulls sets the maximum number of image pulls in parallel.
4370+
This field cannot be set if SerializeImagePulls is true.
4371+
Setting it to nil means no limit.
4372+
Default: nil
4373+
format: int32
4374+
type: integer
43674375
maxPods:
43684376
description: MaxPods is the number of pods that can run on this
43694377
Kubelet.
@@ -4818,6 +4826,14 @@ spec:
48184826
description: LogLevel is the logging level of the kubelet
48194827
format: int32
48204828
type: integer
4829+
maxParallelImagePulls:
4830+
description: |-
4831+
MaxParallelImagePulls sets the maximum number of image pulls in parallel.
4832+
This field cannot be set if SerializeImagePulls is true.
4833+
Setting it to nil means no limit.
4834+
Default: nil
4835+
format: int32
4836+
type: integer
48214837
maxPods:
48224838
description: MaxPods is the number of pods that can run on this
48234839
Kubelet.

k8s/crds/kops.k8s.io_instancegroups.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,14 @@ spec:
679679
description: LogLevel is the logging level of the kubelet
680680
format: int32
681681
type: integer
682+
maxParallelImagePulls:
683+
description: |-
684+
MaxParallelImagePulls sets the maximum number of image pulls in parallel.
685+
This field cannot be set if SerializeImagePulls is true.
686+
Setting it to nil means no limit.
687+
Default: nil
688+
format: int32
689+
type: integer
682690
maxPods:
683691
description: MaxPods is the number of pods that can run on this
684692
Kubelet.

nodeup/pkg/model/kubelet.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ func buildKubeletComponentConfig(kubeletConfig *kops.KubeletConfigSpec, provider
255255
if kubeletConfig.ImageMinimumGCAge != nil {
256256
componentConfig.ImageMinimumGCAge = *kubeletConfig.ImageMinimumGCAge
257257
}
258+
componentConfig.MaxParallelImagePulls = kubeletConfig.MaxParallelImagePulls
258259
componentConfig.MemorySwap.SwapBehavior = kubeletConfig.MemorySwapBehavior
259260

260261
s := runtime.NewScheme()

nodeup/pkg/model/kubelet_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ func Test_BuildComponentConfigFile(t *testing.T) {
402402
ShutdownGracePeriodCriticalPods: &metav1.Duration{Duration: 10 * time.Second},
403403
ImageMaximumGCAge: &metav1.Duration{Duration: 30 * time.Hour},
404404
ImageMinimumGCAge: &metav1.Duration{Duration: 30 * time.Minute},
405+
MaxParallelImagePulls: fi.PtrTo(int32(5)),
405406
}
406407

407408
_, err := buildKubeletComponentConfig(&componentConfig, "")

pkg/apis/kops/componentconfig.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@ type KubeletConfigSpec struct {
137137
// The default of this field is "0s", which disables this field--meaning images won't be garbage
138138
// collected based on being unused for too long. Default: "0s" (disabled)
139139
ImageMaximumGCAge *metav1.Duration `json:"imageMaximumGCAge,omitempty"`
140+
// MaxParallelImagePulls sets the maximum number of image pulls in parallel.
141+
// This field cannot be set if SerializeImagePulls is true.
142+
// Setting it to nil means no limit.
143+
// Default: nil
144+
MaxParallelImagePulls *int32 `json:"maxParallelImagePulls,omitempty"`
140145
// ImageGCHighThresholdPercent is the percent of disk usage after which
141146
// image garbage collection is always run.
142147
ImageGCHighThresholdPercent *int32 `json:"imageGCHighThresholdPercent,omitempty" flag:"image-gc-high-threshold"`

pkg/apis/kops/v1alpha2/componentconfig.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@ type KubeletConfigSpec struct {
137137
// The default of this field is "0s", which disables this field--meaning images won't be garbage
138138
// collected based on being unused for too long. Default: "0s" (disabled)
139139
ImageMaximumGCAge *metav1.Duration `json:"imageMaximumGCAge,omitempty"`
140+
// MaxParallelImagePulls sets the maximum number of image pulls in parallel.
141+
// This field cannot be set if SerializeImagePulls is true.
142+
// Setting it to nil means no limit.
143+
// Default: nil
144+
MaxParallelImagePulls *int32 `json:"maxParallelImagePulls,omitempty"`
140145
// ImageGCHighThresholdPercent is the percent of disk usage after which
141146
// image garbage collection is always run.
142147
ImageGCHighThresholdPercent *int32 `json:"imageGCHighThresholdPercent,omitempty" flag:"image-gc-high-threshold"`

pkg/apis/kops/v1alpha2/zz_generated.conversion.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/kops/v1alpha3/componentconfig.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,11 @@ type KubeletConfigSpec struct {
136136
// The default of this field is "0s", which disables this field--meaning images won't be garbage
137137
// collected based on being unused for too long. Default: "0s" (disabled)
138138
ImageMaximumGCAge *metav1.Duration `json:"imageMaximumGCAge,omitempty"`
139+
// MaxParallelImagePulls sets the maximum number of image pulls in parallel.
140+
// This field cannot be set if SerializeImagePulls is true.
141+
// Setting it to nil means no limit.
142+
// Default: nil
143+
MaxParallelImagePulls *int32 `json:"maxParallelImagePulls,omitempty"`
139144
// ImageGCHighThresholdPercent is the percent of disk usage after which
140145
// image garbage collection is always run.
141146
ImageGCHighThresholdPercent *int32 `json:"imageGCHighThresholdPercent,omitempty" flag:"image-gc-high-threshold"`

pkg/apis/kops/v1alpha3/zz_generated.conversion.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)