Skip to content

Commit b2c1a9e

Browse files
authored
Merge pull request #17755 from jaswdr/kubeletconfig-maxparallelimagepulls
Include maxParallelImagePulls field in Kubelet config
2 parents 83e6aaa + 1ef0e59 commit b2c1a9e

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
@@ -4367,6 +4367,14 @@ spec:
43674367
description: LogLevel is the logging level of the kubelet
43684368
format: int32
43694369
type: integer
4370+
maxParallelImagePulls:
4371+
description: |-
4372+
MaxParallelImagePulls sets the maximum number of image pulls in parallel.
4373+
This field cannot be set if SerializeImagePulls is true.
4374+
Setting it to nil means no limit.
4375+
Default: nil
4376+
format: int32
4377+
type: integer
43704378
maxPods:
43714379
description: MaxPods is the number of pods that can run on this
43724380
Kubelet.
@@ -4822,6 +4830,14 @@ spec:
48224830
description: LogLevel is the logging level of the kubelet
48234831
format: int32
48244832
type: integer
4833+
maxParallelImagePulls:
4834+
description: |-
4835+
MaxParallelImagePulls sets the maximum number of image pulls in parallel.
4836+
This field cannot be set if SerializeImagePulls is true.
4837+
Setting it to nil means no limit.
4838+
Default: nil
4839+
format: int32
4840+
type: integer
48254841
maxPods:
48264842
description: MaxPods is the number of pods that can run on this
48274843
Kubelet.

k8s/crds/kops.k8s.io_instancegroups.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,14 @@ spec:
682682
description: LogLevel is the logging level of the kubelet
683683
format: int32
684684
type: integer
685+
maxParallelImagePulls:
686+
description: |-
687+
MaxParallelImagePulls sets the maximum number of image pulls in parallel.
688+
This field cannot be set if SerializeImagePulls is true.
689+
Setting it to nil means no limit.
690+
Default: nil
691+
format: int32
692+
type: integer
685693
maxPods:
686694
description: MaxPods is the number of pods that can run on this
687695
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
@@ -138,6 +138,11 @@ type KubeletConfigSpec struct {
138138
// The default of this field is "0s", which disables this field--meaning images won't be garbage
139139
// collected based on being unused for too long. Default: "0s" (disabled)
140140
ImageMaximumGCAge *metav1.Duration `json:"imageMaximumGCAge,omitempty"`
141+
// MaxParallelImagePulls sets the maximum number of image pulls in parallel.
142+
// This field cannot be set if SerializeImagePulls is true.
143+
// Setting it to nil means no limit.
144+
// Default: nil
145+
MaxParallelImagePulls *int32 `json:"maxParallelImagePulls,omitempty"`
141146
// ImageGCHighThresholdPercent is the percent of disk usage after which
142147
// image garbage collection is always run.
143148
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
@@ -138,6 +138,11 @@ type KubeletConfigSpec struct {
138138
// The default of this field is "0s", which disables this field--meaning images won't be garbage
139139
// collected based on being unused for too long. Default: "0s" (disabled)
140140
ImageMaximumGCAge *metav1.Duration `json:"imageMaximumGCAge,omitempty"`
141+
// MaxParallelImagePulls sets the maximum number of image pulls in parallel.
142+
// This field cannot be set if SerializeImagePulls is true.
143+
// Setting it to nil means no limit.
144+
// Default: nil
145+
MaxParallelImagePulls *int32 `json:"maxParallelImagePulls,omitempty"`
141146
// ImageGCHighThresholdPercent is the percent of disk usage after which
142147
// image garbage collection is always run.
143148
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
@@ -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/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)