mirror of https://github.com/kubernetes/kops.git
Merge pull request #12187 from amitpd/master
Add option in Cluster Autoscaler AddOn for AWS EC2 Static instance list
This commit is contained in:
commit
e51ab4866b
|
|
@ -35,6 +35,7 @@ spec:
|
|||
enabled: true
|
||||
expander: least-waste
|
||||
balanceSimilarNodeGroups: false
|
||||
awsUseStaticInstanceList: false
|
||||
scaleDownUtilizationThreshold: 0.5
|
||||
skipNodesWithLocalStorage: true
|
||||
skipNodesWithSystemPods: true
|
||||
|
|
|
|||
|
|
@ -549,6 +549,11 @@ spec:
|
|||
clusterAutoscaler:
|
||||
description: ClusterAutoscaler defines the cluaster autoscaler configuration.
|
||||
properties:
|
||||
awsUseStaticInstanceList:
|
||||
description: 'AWSUseStaticInstanceList makes cluster autoscaler
|
||||
to use statically defined set of AWS EC2 Instance List. Default:
|
||||
false'
|
||||
type: boolean
|
||||
balanceSimilarNodeGroups:
|
||||
description: 'BalanceSimilarNodeGroups makes cluster autoscaler
|
||||
treat similar node groups as one. Default: false'
|
||||
|
|
|
|||
|
|
@ -961,6 +961,9 @@ type ClusterAutoscalerConfig struct {
|
|||
// BalanceSimilarNodeGroups makes cluster autoscaler treat similar node groups as one.
|
||||
// Default: false
|
||||
BalanceSimilarNodeGroups *bool `json:"balanceSimilarNodeGroups,omitempty"`
|
||||
// AWSUseStaticInstanceList makes cluster autoscaler to use statically defined set of AWS EC2 Instance List.
|
||||
// Default: false
|
||||
AWSUseStaticInstanceList *bool `json:"awsUseStaticInstanceList,omitempty"`
|
||||
// ScaleDownUtilizationThreshold determines the utilization threshold for node scale-down.
|
||||
// Default: 0.5
|
||||
ScaleDownUtilizationThreshold *string `json:"scaleDownUtilizationThreshold,omitempty"`
|
||||
|
|
|
|||
|
|
@ -960,6 +960,9 @@ type ClusterAutoscalerConfig struct {
|
|||
// BalanceSimilarNodeGroups makes cluster autoscaler treat similar node groups as one.
|
||||
// Default: false
|
||||
BalanceSimilarNodeGroups *bool `json:"balanceSimilarNodeGroups,omitempty"`
|
||||
// AWSUseStaticInstanceList makes cluster autoscaler to use statically defined set of AWS EC2 Instance List.
|
||||
// Default: false
|
||||
AWSUseStaticInstanceList *bool `json:"awsUseStaticInstanceList,omitempty"`
|
||||
// ScaleDownUtilizationThreshold determines the utilization threshold for node scale-down.
|
||||
// Default: 0.5
|
||||
ScaleDownUtilizationThreshold *string `json:"scaleDownUtilizationThreshold,omitempty"`
|
||||
|
|
|
|||
|
|
@ -2172,6 +2172,7 @@ func autoConvert_v1alpha2_ClusterAutoscalerConfig_To_kops_ClusterAutoscalerConfi
|
|||
out.Enabled = in.Enabled
|
||||
out.Expander = in.Expander
|
||||
out.BalanceSimilarNodeGroups = in.BalanceSimilarNodeGroups
|
||||
out.AWSUseStaticInstanceList = in.AWSUseStaticInstanceList
|
||||
out.ScaleDownUtilizationThreshold = in.ScaleDownUtilizationThreshold
|
||||
out.SkipNodesWithSystemPods = in.SkipNodesWithSystemPods
|
||||
out.SkipNodesWithLocalStorage = in.SkipNodesWithLocalStorage
|
||||
|
|
@ -2192,6 +2193,7 @@ func autoConvert_kops_ClusterAutoscalerConfig_To_v1alpha2_ClusterAutoscalerConfi
|
|||
out.Enabled = in.Enabled
|
||||
out.Expander = in.Expander
|
||||
out.BalanceSimilarNodeGroups = in.BalanceSimilarNodeGroups
|
||||
out.AWSUseStaticInstanceList = in.AWSUseStaticInstanceList
|
||||
out.ScaleDownUtilizationThreshold = in.ScaleDownUtilizationThreshold
|
||||
out.SkipNodesWithSystemPods = in.SkipNodesWithSystemPods
|
||||
out.SkipNodesWithLocalStorage = in.SkipNodesWithLocalStorage
|
||||
|
|
|
|||
|
|
@ -777,6 +777,11 @@ func (in *ClusterAutoscalerConfig) DeepCopyInto(out *ClusterAutoscalerConfig) {
|
|||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.AWSUseStaticInstanceList != nil {
|
||||
in, out := &in.AWSUseStaticInstanceList, &out.AWSUseStaticInstanceList
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.ScaleDownUtilizationThreshold != nil {
|
||||
in, out := &in.ScaleDownUtilizationThreshold, &out.ScaleDownUtilizationThreshold
|
||||
*out = new(string)
|
||||
|
|
|
|||
|
|
@ -861,6 +861,11 @@ func (in *ClusterAutoscalerConfig) DeepCopyInto(out *ClusterAutoscalerConfig) {
|
|||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.AWSUseStaticInstanceList != nil {
|
||||
in, out := &in.AWSUseStaticInstanceList, &out.AWSUseStaticInstanceList
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.ScaleDownUtilizationThreshold != nil {
|
||||
in, out := &in.ScaleDownUtilizationThreshold, &out.ScaleDownUtilizationThreshold
|
||||
*out = new(string)
|
||||
|
|
|
|||
|
|
@ -80,6 +80,9 @@ func (b *ClusterAutoscalerOptionsBuilder) BuildOptions(o interface{}) error {
|
|||
if cas.BalanceSimilarNodeGroups == nil {
|
||||
cas.BalanceSimilarNodeGroups = fi.Bool(false)
|
||||
}
|
||||
if cas.AWSUseStaticInstanceList == nil {
|
||||
cas.AWSUseStaticInstanceList = fi.Bool(false)
|
||||
}
|
||||
if cas.NewPodScaleUpDelay == nil {
|
||||
cas.NewPodScaleUpDelay = fi.String("0s")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ spec:
|
|||
cloudControllerManager: {}
|
||||
cloudProvider: aws
|
||||
clusterAutoscaler:
|
||||
awsUseStaticInstanceList: false
|
||||
balanceSimilarNodeGroups: false
|
||||
enabled: true
|
||||
expander: random
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ spec:
|
|||
k8s-addon: dns-controller.addons.k8s.io
|
||||
- id: k8s-1.15
|
||||
manifest: cluster-autoscaler.addons.k8s.io/k8s-1.15.yaml
|
||||
manifestHash: 88c94b9a9e3308c85c240a03248bd8e4dbd27343d4749e4eb9ec8f2c8adf1348
|
||||
manifestHash: 1299b049a099f57974cd698ac89222abbb41bdd249e7d4f33bce4ca753eda424
|
||||
name: cluster-autoscaler.addons.k8s.io
|
||||
selector:
|
||||
k8s-addon: cluster-autoscaler.addons.k8s.io
|
||||
|
|
|
|||
|
|
@ -295,6 +295,7 @@ spec:
|
|||
- ./cluster-autoscaler
|
||||
- --balance-similar-node-groups=false
|
||||
- --cloud-provider=aws
|
||||
- --aws-use-static-instance-list=false
|
||||
- --expander=random
|
||||
- --nodes=2:2:nodes.minimal.example.com
|
||||
- --scale-down-utilization-threshold=0.5
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ spec:
|
|||
cloudControllerManager: {}
|
||||
cloudProvider: aws
|
||||
clusterAutoscaler:
|
||||
awsUseStaticInstanceList: false
|
||||
balanceSimilarNodeGroups: false
|
||||
enabled: true
|
||||
expander: random
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ spec:
|
|||
k8s-addon: dns-controller.addons.k8s.io
|
||||
- id: k8s-1.15
|
||||
manifest: cluster-autoscaler.addons.k8s.io/k8s-1.15.yaml
|
||||
manifestHash: d3af566737e6e887aae943c29292e5bc033efb0b77bccca3c027c72f66883fda
|
||||
manifestHash: f7e1e3dde3b3bf5baba2ccc79ed7e154559e8a5f7c320feca0821ec2b2f799ad
|
||||
name: cluster-autoscaler.addons.k8s.io
|
||||
selector:
|
||||
k8s-addon: cluster-autoscaler.addons.k8s.io
|
||||
|
|
|
|||
|
|
@ -295,6 +295,7 @@ spec:
|
|||
- ./cluster-autoscaler
|
||||
- --balance-similar-node-groups=false
|
||||
- --cloud-provider=aws
|
||||
- --aws-use-static-instance-list=false
|
||||
- --expander=random
|
||||
- --nodes=2:2:nodes.minimal.example.com
|
||||
- --scale-down-utilization-threshold=0.5
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ spec:
|
|||
manageStorageClasses: true
|
||||
cloudProvider: aws
|
||||
clusterAutoscaler:
|
||||
awsUseStaticInstanceList: false
|
||||
balanceSimilarNodeGroups: false
|
||||
enabled: true
|
||||
expander: random
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ spec:
|
|||
k8s-addon: dns-controller.addons.k8s.io
|
||||
- id: k8s-1.15
|
||||
manifest: cluster-autoscaler.addons.k8s.io/k8s-1.15.yaml
|
||||
manifestHash: d3af566737e6e887aae943c29292e5bc033efb0b77bccca3c027c72f66883fda
|
||||
manifestHash: f7e1e3dde3b3bf5baba2ccc79ed7e154559e8a5f7c320feca0821ec2b2f799ad
|
||||
name: cluster-autoscaler.addons.k8s.io
|
||||
selector:
|
||||
k8s-addon: cluster-autoscaler.addons.k8s.io
|
||||
|
|
|
|||
|
|
@ -295,6 +295,7 @@ spec:
|
|||
- ./cluster-autoscaler
|
||||
- --balance-similar-node-groups=false
|
||||
- --cloud-provider=aws
|
||||
- --aws-use-static-instance-list=false
|
||||
- --expander=random
|
||||
- --nodes=2:2:nodes.minimal.example.com
|
||||
- --scale-down-utilization-threshold=0.5
|
||||
|
|
|
|||
|
|
@ -282,6 +282,9 @@ spec:
|
|||
- ./cluster-autoscaler
|
||||
- --balance-similar-node-groups={{ .BalanceSimilarNodeGroups }}
|
||||
- --cloud-provider={{ $.CloudProvider }}
|
||||
{{ if (eq $.CloudProvider "aws") }}
|
||||
- --aws-use-static-instance-list={{ .AWSUseStaticInstanceList }}
|
||||
{{ end }}
|
||||
- --expander={{ .Expander }}
|
||||
{{ range $name, $spec := GetNodeInstanceGroups }}
|
||||
{{ if WithDefaultBool $spec.Autoscale true }}
|
||||
|
|
|
|||
Loading…
Reference in New Issue