diff --git a/pkg/apis/kops/componentconfig.go b/pkg/apis/kops/componentconfig.go index 0885a3d604..3cde95afac 100644 --- a/pkg/apis/kops/componentconfig.go +++ b/pkg/apis/kops/componentconfig.go @@ -116,6 +116,9 @@ type KubeletConfigSpec struct { // image garbage collection is never run. Lowest disk usage to garbage // collect to. ImageGCLowThresholdPercent *int32 `json:"imageGCLowThresholdPercent,omitempty" flag:"image-gc-low-threshold"` + // ImagePullProgressDeadline is the timeout for image pulls + // If no pulling progress is made before this deadline, the image pulling will be cancelled. (default 1m0s) + ImagePullProgressDeadline *metav1.Duration `json:"imagePullProgressDeadline,omitempty" flag:"image-pull-progress-deadline"` // Comma-delimited list of hard eviction expressions. For example, 'memory.available<300Mi'. EvictionHard *string `json:"evictionHard,omitempty" flag:"eviction-hard"` // Comma-delimited list of soft eviction expressions. For example, 'memory.available<300Mi'. diff --git a/pkg/apis/kops/v1alpha1/componentconfig.go b/pkg/apis/kops/v1alpha1/componentconfig.go index 226a2b6ed5..897868d44a 100644 --- a/pkg/apis/kops/v1alpha1/componentconfig.go +++ b/pkg/apis/kops/v1alpha1/componentconfig.go @@ -116,6 +116,9 @@ type KubeletConfigSpec struct { // image garbage collection is never run. Lowest disk usage to garbage // collect to. ImageGCLowThresholdPercent *int32 `json:"imageGCLowThresholdPercent,omitempty" flag:"image-gc-low-threshold"` + // ImagePullProgressDeadline is the timeout for image pulls + // If no pulling progress is made before this deadline, the image pulling will be cancelled. (default 1m0s) + ImagePullProgressDeadline *metav1.Duration `json:"imagePullProgressDeadline,omitempty" flag:"image-pull-progress-deadline"` // Comma-delimited list of hard eviction expressions. For example, 'memory.available<300Mi'. EvictionHard *string `json:"evictionHard,omitempty" flag:"eviction-hard"` // Comma-delimited list of soft eviction expressions. For example, 'memory.available<300Mi'. diff --git a/pkg/apis/kops/v1alpha1/zz_generated.conversion.go b/pkg/apis/kops/v1alpha1/zz_generated.conversion.go index 5504521f15..0936a84adc 100644 --- a/pkg/apis/kops/v1alpha1/zz_generated.conversion.go +++ b/pkg/apis/kops/v1alpha1/zz_generated.conversion.go @@ -2137,6 +2137,7 @@ func autoConvert_v1alpha1_KubeletConfigSpec_To_kops_KubeletConfigSpec(in *Kubele out.NetworkPluginMTU = in.NetworkPluginMTU out.ImageGCHighThresholdPercent = in.ImageGCHighThresholdPercent out.ImageGCLowThresholdPercent = in.ImageGCLowThresholdPercent + out.ImagePullProgressDeadline = in.ImagePullProgressDeadline out.EvictionHard = in.EvictionHard out.EvictionSoft = in.EvictionSoft out.EvictionSoftGracePeriod = in.EvictionSoftGracePeriod @@ -2200,6 +2201,7 @@ func autoConvert_kops_KubeletConfigSpec_To_v1alpha1_KubeletConfigSpec(in *kops.K out.NetworkPluginMTU = in.NetworkPluginMTU out.ImageGCHighThresholdPercent = in.ImageGCHighThresholdPercent out.ImageGCLowThresholdPercent = in.ImageGCLowThresholdPercent + out.ImagePullProgressDeadline = in.ImagePullProgressDeadline out.EvictionHard = in.EvictionHard out.EvictionSoft = in.EvictionSoft out.EvictionSoftGracePeriod = in.EvictionSoftGracePeriod diff --git a/pkg/apis/kops/v1alpha2/componentconfig.go b/pkg/apis/kops/v1alpha2/componentconfig.go index 4b61278732..36b11ff54c 100644 --- a/pkg/apis/kops/v1alpha2/componentconfig.go +++ b/pkg/apis/kops/v1alpha2/componentconfig.go @@ -116,6 +116,9 @@ type KubeletConfigSpec struct { // image garbage collection is never run. Lowest disk usage to garbage // collect to. ImageGCLowThresholdPercent *int32 `json:"imageGCLowThresholdPercent,omitempty" flag:"image-gc-low-threshold"` + // ImagePullProgressDeadline is the timeout for image pulls + // If no pulling progress is made before this deadline, the image pulling will be cancelled. (default 1m0s) + ImagePullProgressDeadline *metav1.Duration `json:"imagePullProgressDeadline,omitempty" flag:"image-pull-progress-deadline"` // Comma-delimited list of hard eviction expressions. For example, 'memory.available<300Mi'. EvictionHard *string `json:"evictionHard,omitempty" flag:"eviction-hard"` // Comma-delimited list of soft eviction expressions. For example, 'memory.available<300Mi'. diff --git a/pkg/apis/kops/v1alpha2/zz_generated.conversion.go b/pkg/apis/kops/v1alpha2/zz_generated.conversion.go index 8b4d99d4e1..402182b272 100644 --- a/pkg/apis/kops/v1alpha2/zz_generated.conversion.go +++ b/pkg/apis/kops/v1alpha2/zz_generated.conversion.go @@ -2399,6 +2399,7 @@ func autoConvert_v1alpha2_KubeletConfigSpec_To_kops_KubeletConfigSpec(in *Kubele out.NetworkPluginMTU = in.NetworkPluginMTU out.ImageGCHighThresholdPercent = in.ImageGCHighThresholdPercent out.ImageGCLowThresholdPercent = in.ImageGCLowThresholdPercent + out.ImagePullProgressDeadline = in.ImagePullProgressDeadline out.EvictionHard = in.EvictionHard out.EvictionSoft = in.EvictionSoft out.EvictionSoftGracePeriod = in.EvictionSoftGracePeriod @@ -2462,6 +2463,7 @@ func autoConvert_kops_KubeletConfigSpec_To_v1alpha2_KubeletConfigSpec(in *kops.K out.NetworkPluginMTU = in.NetworkPluginMTU out.ImageGCHighThresholdPercent = in.ImageGCHighThresholdPercent out.ImageGCLowThresholdPercent = in.ImageGCLowThresholdPercent + out.ImagePullProgressDeadline = in.ImagePullProgressDeadline out.EvictionHard = in.EvictionHard out.EvictionSoft = in.EvictionSoft out.EvictionSoftGracePeriod = in.EvictionSoftGracePeriod