mirror of https://github.com/kubernetes/kops.git
Merge pull request #6375 from mytaxi/kubelet-cpu-cfs-quota
Allow users to set kubelet cpu-cfs-quota and cpu-cfs-quota-period flags
This commit is contained in:
commit
c1c74b7fdc
|
|
@ -179,6 +179,10 @@ type KubeletConfigSpec struct {
|
|||
AuthenticationTokenWebhook *bool `json:"authenticationTokenWebhook,omitempty" flag:"authentication-token-webhook"`
|
||||
// AuthenticationTokenWebhook sets the duration to cache responses from the webhook token authenticator. Default is 2m. (default 2m0s)
|
||||
AuthenticationTokenWebhookCacheTTL *metav1.Duration `json:"authenticationTokenWebhookCacheTtl,omitempty" flag:"authentication-token-webhook-cache-ttl"`
|
||||
// CPUCFSQuota enables CPU CFS quota enforcement for containers that specify CPU limits
|
||||
CPUCFSQuota *bool `json:"cpuCFSQuota,omitempty" flag:"cpu-cfs-quota"`
|
||||
// CPUCFSQuotaPeriod sets CPU CFS quota period value, cpu.cfs_period_us, defaults to Linux Kernel default
|
||||
CPUCFSQuotaPeriod *metav1.Duration `json:"cpuCFSQuotaPeriod,omitempty" flag:"cpu-cfs-quota-period"`
|
||||
}
|
||||
|
||||
// KubeProxyConfig defines the configuration for a proxy
|
||||
|
|
|
|||
|
|
@ -179,6 +179,10 @@ type KubeletConfigSpec struct {
|
|||
AuthenticationTokenWebhook *bool `json:"authenticationTokenWebhook,omitempty" flag:"authentication-token-webhook"`
|
||||
// AuthenticationTokenWebhook sets the duration to cache responses from the webhook token authenticator. Default is 2m. (default 2m0s)
|
||||
AuthenticationTokenWebhookCacheTTL *metav1.Duration `json:"authenticationTokenWebhookCacheTtl,omitempty" flag:"authentication-token-webhook-cache-ttl"`
|
||||
// CPUCFSQuota enables CPU CFS quota enforcement for containers that specify CPU limits
|
||||
CPUCFSQuota *bool `json:"cpuCFSQuota,omitempty" flag:"cpu-cfs-quota"`
|
||||
// CPUCFSQuotaPeriod sets CPU CFS quota period value, cpu.cfs_period_us, defaults to Linux Kernel default
|
||||
CPUCFSQuotaPeriod *metav1.Duration `json:"cpuCFSQuotaPeriod,omitempty" flag:"cpu-cfs-quota-period"`
|
||||
}
|
||||
|
||||
// KubeProxyConfig defines the configuration for a proxy
|
||||
|
|
|
|||
|
|
@ -3309,6 +3309,8 @@ func autoConvert_v1alpha1_KubeletConfigSpec_To_kops_KubeletConfigSpec(in *Kubele
|
|||
out.RootDir = in.RootDir
|
||||
out.AuthenticationTokenWebhook = in.AuthenticationTokenWebhook
|
||||
out.AuthenticationTokenWebhookCacheTTL = in.AuthenticationTokenWebhookCacheTTL
|
||||
out.CPUCFSQuota = in.CPUCFSQuota
|
||||
out.CPUCFSQuotaPeriod = in.CPUCFSQuotaPeriod
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -3386,6 +3388,8 @@ func autoConvert_kops_KubeletConfigSpec_To_v1alpha1_KubeletConfigSpec(in *kops.K
|
|||
out.RootDir = in.RootDir
|
||||
out.AuthenticationTokenWebhook = in.AuthenticationTokenWebhook
|
||||
out.AuthenticationTokenWebhookCacheTTL = in.AuthenticationTokenWebhookCacheTTL
|
||||
out.CPUCFSQuota = in.CPUCFSQuota
|
||||
out.CPUCFSQuotaPeriod = in.CPUCFSQuotaPeriod
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2190,6 +2190,16 @@ func (in *KubeletConfigSpec) DeepCopyInto(out *KubeletConfigSpec) {
|
|||
*out = new(v1.Duration)
|
||||
**out = **in
|
||||
}
|
||||
if in.CPUCFSQuota != nil {
|
||||
in, out := &in.CPUCFSQuota, &out.CPUCFSQuota
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.CPUCFSQuotaPeriod != nil {
|
||||
in, out := &in.CPUCFSQuotaPeriod, &out.CPUCFSQuotaPeriod
|
||||
*out = new(v1.Duration)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -179,6 +179,10 @@ type KubeletConfigSpec struct {
|
|||
AuthenticationTokenWebhook *bool `json:"authenticationTokenWebhook,omitempty" flag:"authentication-token-webhook"`
|
||||
// AuthenticationTokenWebhook sets the duration to cache responses from the webhook token authenticator. Default is 2m. (default 2m0s)
|
||||
AuthenticationTokenWebhookCacheTTL *metav1.Duration `json:"authenticationTokenWebhookCacheTtl,omitempty" flag:"authentication-token-webhook-cache-ttl"`
|
||||
// CPUCFSQuota enables CPU CFS quota enforcement for containers that specify CPU limits
|
||||
CPUCFSQuota *bool `json:"cpuCFSQuota,omitempty" flag:"cpu-cfs-quota"`
|
||||
// CPUCFSQuotaPeriod sets CPU CFS quota period value, cpu.cfs_period_us, defaults to Linux Kernel default
|
||||
CPUCFSQuotaPeriod *metav1.Duration `json:"cpuCFSQuotaPeriod,omitempty" flag:"cpu-cfs-quota-period"`
|
||||
}
|
||||
|
||||
// KubeProxyConfig defines the configuration for a proxy
|
||||
|
|
|
|||
|
|
@ -3579,6 +3579,8 @@ func autoConvert_v1alpha2_KubeletConfigSpec_To_kops_KubeletConfigSpec(in *Kubele
|
|||
out.RootDir = in.RootDir
|
||||
out.AuthenticationTokenWebhook = in.AuthenticationTokenWebhook
|
||||
out.AuthenticationTokenWebhookCacheTTL = in.AuthenticationTokenWebhookCacheTTL
|
||||
out.CPUCFSQuota = in.CPUCFSQuota
|
||||
out.CPUCFSQuotaPeriod = in.CPUCFSQuotaPeriod
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -3656,6 +3658,8 @@ func autoConvert_kops_KubeletConfigSpec_To_v1alpha2_KubeletConfigSpec(in *kops.K
|
|||
out.RootDir = in.RootDir
|
||||
out.AuthenticationTokenWebhook = in.AuthenticationTokenWebhook
|
||||
out.AuthenticationTokenWebhookCacheTTL = in.AuthenticationTokenWebhookCacheTTL
|
||||
out.CPUCFSQuota = in.CPUCFSQuota
|
||||
out.CPUCFSQuotaPeriod = in.CPUCFSQuotaPeriod
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2261,6 +2261,16 @@ func (in *KubeletConfigSpec) DeepCopyInto(out *KubeletConfigSpec) {
|
|||
*out = new(v1.Duration)
|
||||
**out = **in
|
||||
}
|
||||
if in.CPUCFSQuota != nil {
|
||||
in, out := &in.CPUCFSQuota, &out.CPUCFSQuota
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.CPUCFSQuotaPeriod != nil {
|
||||
in, out := &in.CPUCFSQuotaPeriod, &out.CPUCFSQuotaPeriod
|
||||
*out = new(v1.Duration)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2443,6 +2443,16 @@ func (in *KubeletConfigSpec) DeepCopyInto(out *KubeletConfigSpec) {
|
|||
*out = new(v1.Duration)
|
||||
**out = **in
|
||||
}
|
||||
if in.CPUCFSQuota != nil {
|
||||
in, out := &in.CPUCFSQuota, &out.CPUCFSQuota
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.CPUCFSQuotaPeriod != nil {
|
||||
in, out := &in.CPUCFSQuotaPeriod, &out.CPUCFSQuotaPeriod
|
||||
*out = new(v1.Duration)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue