mirror of https://github.com/kubernetes/kops.git
Support setting cluster-autoscaler's skip-nodes-with-custom-controller-pods parameter
This commit is contained in:
parent
419b93b9e9
commit
dd665fbe1e
|
|
@ -73,6 +73,7 @@ spec:
|
|||
balanceSimilarNodeGroups: false
|
||||
awsUseStaticInstanceList: false
|
||||
scaleDownUtilizationThreshold: 0.5
|
||||
skipNodesWithCustomControllerPods: true
|
||||
skipNodesWithLocalStorage: true
|
||||
skipNodesWithSystemPods: true
|
||||
newPodScaleUpDelay: 0s
|
||||
|
|
|
|||
|
|
@ -780,6 +780,11 @@ spec:
|
|||
description: 'ScaleDownUtilizationThreshold determines the utilization
|
||||
threshold for node scale-down. Default: 0.5'
|
||||
type: string
|
||||
skipNodesWithCustomControllerPods:
|
||||
description: 'SkipNodesWithCustomControllerPods makes the cluster
|
||||
autoscaler skip scale-down of nodes with pods owned by custom
|
||||
controllers. Default: true'
|
||||
type: boolean
|
||||
skipNodesWithLocalStorage:
|
||||
description: 'SkipNodesWithLocalStorage makes the cluster autoscaler
|
||||
skip scale-down of nodes with local storage. Default: true'
|
||||
|
|
|
|||
|
|
@ -1028,6 +1028,9 @@ type ClusterAutoscalerConfig struct {
|
|||
// ScaleDownUtilizationThreshold determines the utilization threshold for node scale-down.
|
||||
// Default: 0.5
|
||||
ScaleDownUtilizationThreshold *string `json:"scaleDownUtilizationThreshold,omitempty"`
|
||||
// SkipNodesWithCustomControllerPods makes the cluster autoscaler skip scale-down of nodes with pods owned by custom controllers.
|
||||
// Default: true
|
||||
SkipNodesWithCustomControllerPods *bool `json:"skipNodesWithCustomControllerPods,omitempty"`
|
||||
// SkipNodesWithSystemPods makes the cluster autoscaler skip scale-down of nodes with non-DaemonSet pods in the kube-system namespace.
|
||||
// Default: true
|
||||
SkipNodesWithSystemPods *bool `json:"skipNodesWithSystemPods,omitempty"`
|
||||
|
|
|
|||
|
|
@ -1091,6 +1091,9 @@ type ClusterAutoscalerConfig struct {
|
|||
// ScaleDownUtilizationThreshold determines the utilization threshold for node scale-down.
|
||||
// Default: 0.5
|
||||
ScaleDownUtilizationThreshold *string `json:"scaleDownUtilizationThreshold,omitempty"`
|
||||
// SkipNodesWithCustomControllerPods makes the cluster autoscaler skip scale-down of nodes with pods owned by custom controllers.
|
||||
// Default: true
|
||||
SkipNodesWithCustomControllerPods *bool `json:"skipNodesWithCustomControllerPods,omitempty"`
|
||||
// SkipNodesWithSystemPods makes the cluster autoscaler skip scale-down of nodes with non-DaemonSet pods in the kube-system namespace.
|
||||
// Default: true
|
||||
SkipNodesWithSystemPods *bool `json:"skipNodesWithSystemPods,omitempty"`
|
||||
|
|
|
|||
|
|
@ -2308,6 +2308,7 @@ func autoConvert_v1alpha2_ClusterAutoscalerConfig_To_kops_ClusterAutoscalerConfi
|
|||
out.AWSUseStaticInstanceList = in.AWSUseStaticInstanceList
|
||||
out.IgnoreDaemonSetsUtilization = in.IgnoreDaemonSetsUtilization
|
||||
out.ScaleDownUtilizationThreshold = in.ScaleDownUtilizationThreshold
|
||||
out.SkipNodesWithCustomControllerPods = in.SkipNodesWithCustomControllerPods
|
||||
out.SkipNodesWithSystemPods = in.SkipNodesWithSystemPods
|
||||
out.SkipNodesWithLocalStorage = in.SkipNodesWithLocalStorage
|
||||
out.NewPodScaleUpDelay = in.NewPodScaleUpDelay
|
||||
|
|
@ -2337,6 +2338,7 @@ func autoConvert_kops_ClusterAutoscalerConfig_To_v1alpha2_ClusterAutoscalerConfi
|
|||
out.AWSUseStaticInstanceList = in.AWSUseStaticInstanceList
|
||||
out.IgnoreDaemonSetsUtilization = in.IgnoreDaemonSetsUtilization
|
||||
out.ScaleDownUtilizationThreshold = in.ScaleDownUtilizationThreshold
|
||||
out.SkipNodesWithCustomControllerPods = in.SkipNodesWithCustomControllerPods
|
||||
out.SkipNodesWithSystemPods = in.SkipNodesWithSystemPods
|
||||
out.SkipNodesWithLocalStorage = in.SkipNodesWithLocalStorage
|
||||
out.NewPodScaleUpDelay = in.NewPodScaleUpDelay
|
||||
|
|
|
|||
|
|
@ -938,6 +938,11 @@ func (in *ClusterAutoscalerConfig) DeepCopyInto(out *ClusterAutoscalerConfig) {
|
|||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
if in.SkipNodesWithCustomControllerPods != nil {
|
||||
in, out := &in.SkipNodesWithCustomControllerPods, &out.SkipNodesWithCustomControllerPods
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.SkipNodesWithSystemPods != nil {
|
||||
in, out := &in.SkipNodesWithSystemPods, &out.SkipNodesWithSystemPods
|
||||
*out = new(bool)
|
||||
|
|
|
|||
|
|
@ -1020,6 +1020,9 @@ type ClusterAutoscalerConfig struct {
|
|||
// ScaleDownUtilizationThreshold determines the utilization threshold for node scale-down.
|
||||
// Default: 0.5
|
||||
ScaleDownUtilizationThreshold *string `json:"scaleDownUtilizationThreshold,omitempty"`
|
||||
// SkipNodesWithCustomControllerPods makes the cluster autoscaler skip scale-down of nodes with pods owned by custom controllers.
|
||||
// Default: true
|
||||
SkipNodesWithCustomControllerPods *bool `json:"skipNodesWithCustomControllerPods,omitempty"`
|
||||
// SkipNodesWithSystemPods makes the cluster autoscaler skip scale-down of nodes with non-DaemonSet pods in the kube-system namespace.
|
||||
// Default: true
|
||||
SkipNodesWithSystemPods *bool `json:"skipNodesWithSystemPods,omitempty"`
|
||||
|
|
|
|||
|
|
@ -2554,6 +2554,7 @@ func autoConvert_v1alpha3_ClusterAutoscalerConfig_To_kops_ClusterAutoscalerConfi
|
|||
out.AWSUseStaticInstanceList = in.AWSUseStaticInstanceList
|
||||
out.IgnoreDaemonSetsUtilization = in.IgnoreDaemonSetsUtilization
|
||||
out.ScaleDownUtilizationThreshold = in.ScaleDownUtilizationThreshold
|
||||
out.SkipNodesWithCustomControllerPods = in.SkipNodesWithCustomControllerPods
|
||||
out.SkipNodesWithSystemPods = in.SkipNodesWithSystemPods
|
||||
out.SkipNodesWithLocalStorage = in.SkipNodesWithLocalStorage
|
||||
out.NewPodScaleUpDelay = in.NewPodScaleUpDelay
|
||||
|
|
@ -2583,6 +2584,7 @@ func autoConvert_kops_ClusterAutoscalerConfig_To_v1alpha3_ClusterAutoscalerConfi
|
|||
out.AWSUseStaticInstanceList = in.AWSUseStaticInstanceList
|
||||
out.IgnoreDaemonSetsUtilization = in.IgnoreDaemonSetsUtilization
|
||||
out.ScaleDownUtilizationThreshold = in.ScaleDownUtilizationThreshold
|
||||
out.SkipNodesWithCustomControllerPods = in.SkipNodesWithCustomControllerPods
|
||||
out.SkipNodesWithSystemPods = in.SkipNodesWithSystemPods
|
||||
out.SkipNodesWithLocalStorage = in.SkipNodesWithLocalStorage
|
||||
out.NewPodScaleUpDelay = in.NewPodScaleUpDelay
|
||||
|
|
|
|||
|
|
@ -900,6 +900,11 @@ func (in *ClusterAutoscalerConfig) DeepCopyInto(out *ClusterAutoscalerConfig) {
|
|||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
if in.SkipNodesWithCustomControllerPods != nil {
|
||||
in, out := &in.SkipNodesWithCustomControllerPods, &out.SkipNodesWithCustomControllerPods
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.SkipNodesWithSystemPods != nil {
|
||||
in, out := &in.SkipNodesWithSystemPods, &out.SkipNodesWithSystemPods
|
||||
*out = new(bool)
|
||||
|
|
|
|||
|
|
@ -997,6 +997,11 @@ func (in *ClusterAutoscalerConfig) DeepCopyInto(out *ClusterAutoscalerConfig) {
|
|||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
if in.SkipNodesWithCustomControllerPods != nil {
|
||||
in, out := &in.SkipNodesWithCustomControllerPods, &out.SkipNodesWithCustomControllerPods
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.SkipNodesWithSystemPods != nil {
|
||||
in, out := &in.SkipNodesWithSystemPods, &out.SkipNodesWithSystemPods
|
||||
*out = new(bool)
|
||||
|
|
|
|||
|
|
@ -69,6 +69,9 @@ func (b *ClusterAutoscalerOptionsBuilder) BuildOptions(o interface{}) error {
|
|||
if cas.ScaleDownUtilizationThreshold == nil {
|
||||
cas.ScaleDownUtilizationThreshold = fi.PtrTo("0.5")
|
||||
}
|
||||
if cas.SkipNodesWithCustomControllerPods == nil {
|
||||
cas.SkipNodesWithCustomControllerPods = fi.PtrTo(true)
|
||||
}
|
||||
if cas.SkipNodesWithLocalStorage == nil {
|
||||
cas.SkipNodesWithLocalStorage = fi.PtrTo(true)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ spec:
|
|||
scaleDownUnneededTime: 10m0s
|
||||
scaleDownUnreadyTime: 20m0s
|
||||
scaleDownUtilizationThreshold: "0.5"
|
||||
skipNodesWithCustomControllerPods: true
|
||||
skipNodesWithLocalStorage: true
|
||||
skipNodesWithSystemPods: true
|
||||
clusterDNSDomain: cluster.local
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ spec:
|
|||
scaleDownUnneededTime: 10m0s
|
||||
scaleDownUnreadyTime: 20m0s
|
||||
scaleDownUtilizationThreshold: "0.5"
|
||||
skipNodesWithCustomControllerPods: true
|
||||
skipNodesWithLocalStorage: true
|
||||
skipNodesWithSystemPods: true
|
||||
clusterDNSDomain: cluster.local
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ spec:
|
|||
scaleDownUnneededTime: 10m0s
|
||||
scaleDownUnreadyTime: 20m0s
|
||||
scaleDownUtilizationThreshold: "0.5"
|
||||
skipNodesWithCustomControllerPods: true
|
||||
skipNodesWithLocalStorage: true
|
||||
skipNodesWithSystemPods: true
|
||||
clusterDNSDomain: cluster.local
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ spec:
|
|||
scaleDownUnneededTime: 10m0s
|
||||
scaleDownUnreadyTime: 20m0s
|
||||
scaleDownUtilizationThreshold: "0.5"
|
||||
skipNodesWithCustomControllerPods: true
|
||||
skipNodesWithLocalStorage: true
|
||||
skipNodesWithSystemPods: true
|
||||
clusterDNSDomain: cluster.local
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ spec:
|
|||
scaleDownUnneededTime: 10m0s
|
||||
scaleDownUnreadyTime: 20m0s
|
||||
scaleDownUtilizationThreshold: "0.5"
|
||||
skipNodesWithCustomControllerPods: true
|
||||
skipNodesWithLocalStorage: true
|
||||
skipNodesWithSystemPods: true
|
||||
clusterDNSDomain: cluster.local
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ spec:
|
|||
scaleDownUnneededTime: 10m0s
|
||||
scaleDownUnreadyTime: 20m0s
|
||||
scaleDownUtilizationThreshold: "0.5"
|
||||
skipNodesWithCustomControllerPods: true
|
||||
skipNodesWithLocalStorage: true
|
||||
skipNodesWithSystemPods: true
|
||||
clusterDNSDomain: cluster.local
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ spec:
|
|||
scaleDownUnneededTime: 10m0s
|
||||
scaleDownUnreadyTime: 20m0s
|
||||
scaleDownUtilizationThreshold: "0.5"
|
||||
skipNodesWithCustomControllerPods: true
|
||||
skipNodesWithLocalStorage: true
|
||||
skipNodesWithSystemPods: true
|
||||
clusterDNSDomain: cluster.local
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ spec:
|
|||
scaleDownUnneededTime: 10m0s
|
||||
scaleDownUnreadyTime: 20m0s
|
||||
scaleDownUtilizationThreshold: "0.5"
|
||||
skipNodesWithCustomControllerPods: true
|
||||
skipNodesWithLocalStorage: true
|
||||
skipNodesWithSystemPods: true
|
||||
clusterDNSDomain: cluster.local
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ spec:
|
|||
scaleDownUnneededTime: 10m0s
|
||||
scaleDownUnreadyTime: 20m0s
|
||||
scaleDownUtilizationThreshold: "0.5"
|
||||
skipNodesWithCustomControllerPods: true
|
||||
skipNodesWithLocalStorage: true
|
||||
skipNodesWithSystemPods: true
|
||||
clusterDNSDomain: cluster.local
|
||||
|
|
|
|||
|
|
@ -344,6 +344,9 @@ spec:
|
|||
{{ end }}
|
||||
- --ignore-daemonsets-utilization={{ .IgnoreDaemonSetsUtilization }}
|
||||
- --scale-down-utilization-threshold={{ .ScaleDownUtilizationThreshold }}
|
||||
{{ if IsKubernetesGTE "1.27.0" }}
|
||||
- --skip-nodes-with-custom-controller-pods={{ .SkipNodesWithCustomControllerPods }}
|
||||
{{ end }}
|
||||
- --skip-nodes-with-local-storage={{ .SkipNodesWithLocalStorage }}
|
||||
- --skip-nodes-with-system-pods={{ .SkipNodesWithSystemPods }}
|
||||
- --scale-down-delay-after-add={{ .ScaleDownDelayAfterAdd }}
|
||||
|
|
|
|||
Loading…
Reference in New Issue