Skip to content

Commit 7530f5b

Browse files
authored
Merge pull request #10016 from nareshku/issue-6356
enable kubelet --housekeeping-interval flag
2 parents 8f32c95 + dca6932 commit 7530f5b

File tree

8 files changed

+36
-0
lines changed

8 files changed

+36
-0
lines changed

docs/cluster_spec.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,17 @@ spec:
499499
protectKernelDefaults: true
500500
```
501501

502+
### Housekeeping Interval
503+
{{ kops_feature_table(kops_added_default='1.19', k8s_min='1.2') }}
504+
505+
The interval between container housekeepings defaults to `10s`. This can be too small or too high for some use cases and can be modified with the following addition to the kubelet spec.
506+
507+
```yaml
508+
spec:
509+
kubelet:
510+
housekeepingInterval: 30s
511+
```
512+
502513
## kubeScheduler
503514

504515
This block contains configurations for `kube-scheduler`. See https://kubernetes.io/docs/admin/kube-scheduler/

k8s/crds/kops.k8s.io_clusters.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1646,6 +1646,9 @@ spec:
16461646
hostnameOverride:
16471647
description: HostnameOverride is the hostname used to identify the kubelet instead of the actual hostname.
16481648
type: string
1649+
housekeepingInterval:
1650+
description: HousekeepingInterval allows to specify interval between container housekeepings.
1651+
type: string
16491652
imageGCHighThresholdPercent:
16501653
description: ImageGCHighThresholdPercent is the percent of disk usage after which image garbage collection is always run.
16511654
format: int32
@@ -1924,6 +1927,9 @@ spec:
19241927
hostnameOverride:
19251928
description: HostnameOverride is the hostname used to identify the kubelet instead of the actual hostname.
19261929
type: string
1930+
housekeepingInterval:
1931+
description: HousekeepingInterval allows to specify interval between container housekeepings.
1932+
type: string
19271933
imageGCHighThresholdPercent:
19281934
description: ImageGCHighThresholdPercent is the percent of disk usage after which image garbage collection is always run.
19291935
format: int32

k8s/crds/kops.k8s.io_instancegroups.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,9 @@ spec:
305305
hostnameOverride:
306306
description: HostnameOverride is the hostname used to identify the kubelet instead of the actual hostname.
307307
type: string
308+
housekeepingInterval:
309+
description: HousekeepingInterval allows to specify interval between container housekeepings.
310+
type: string
308311
imageGCHighThresholdPercent:
309312
description: ImageGCHighThresholdPercent is the percent of disk usage after which image garbage collection is always run.
310313
format: int32

pkg/apis/kops/componentconfig.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@ type KubeletConfigSpec struct {
205205
ProtectKernelDefaults *bool `json:"protectKernelDefaults,omitempty" flag:"protect-kernel-defaults"`
206206
// CgroupDriver allows the explicit setting of the kubelet cgroup driver. If omitted, defaults to cgroupfs.
207207
CgroupDriver string `json:"cgroupDriver,omitempty" flag:"cgroup-driver"`
208+
// HousekeepingInterval allows to specify interval between container housekeepings.
209+
HousekeepingInterval *metav1.Duration `json:"housekeepingInterval,omitempty" flag:"housekeeping-interval"`
208210
}
209211

210212
// KubeProxyConfig defines the configuration for a proxy

pkg/apis/kops/v1alpha2/componentconfig.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@ type KubeletConfigSpec struct {
205205
ProtectKernelDefaults *bool `json:"protectKernelDefaults,omitempty" flag:"protect-kernel-defaults"`
206206
// CgroupDriver allows the explicit setting of the kubelet cgroup driver. If omitted, defaults to cgroupfs.
207207
CgroupDriver string `json:"cgroupDriver,omitempty" flag:"cgroup-driver"`
208+
// HousekeepingInterval allows to specify interval between container housekeepings.
209+
HousekeepingInterval *metav1.Duration `json:"housekeepingInterval,omitempty" flag:"housekeeping-interval"`
208210
}
209211

210212
// KubeProxyConfig defines the configuration for a proxy

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/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.

0 commit comments

Comments
 (0)