mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-03-20 08:33:46 +01:00
feat: Add support for allowed_instance_types on self-managed nodegroup ASG (#2757)
Co-authored-by: Bryant Biggs <bryantbiggs@gmail.com>
This commit is contained in:
@@ -216,6 +216,58 @@ module "eks" {
|
||||
}
|
||||
}
|
||||
|
||||
instance_attributes = {
|
||||
name = "instance-attributes"
|
||||
|
||||
min_size = 1
|
||||
max_size = 2
|
||||
desired_size = 1
|
||||
|
||||
bootstrap_extra_args = "--kubelet-extra-args '--node-labels=node.kubernetes.io/lifecycle=spot'"
|
||||
|
||||
instance_type = null
|
||||
|
||||
# launch template configuration
|
||||
instance_requirements = {
|
||||
cpu_manufacturers = ["intel"]
|
||||
instance_generations = ["current", "previous"]
|
||||
spot_max_price_percentage_over_lowest_price = 100
|
||||
|
||||
vcpu_count = {
|
||||
min = 1
|
||||
}
|
||||
|
||||
allowed_instance_types = ["t*", "m*"]
|
||||
}
|
||||
|
||||
use_mixed_instances_policy = true
|
||||
mixed_instances_policy = {
|
||||
instances_distribution = {
|
||||
on_demand_base_capacity = 0
|
||||
on_demand_percentage_above_base_capacity = 0
|
||||
on_demand_allocation_strategy = "lowest-price"
|
||||
spot_allocation_strategy = "price-capacity-optimized"
|
||||
}
|
||||
|
||||
# ASG configuration
|
||||
override = [
|
||||
{
|
||||
instance_requirements = {
|
||||
cpu_manufacturers = ["intel"]
|
||||
instance_generations = ["current", "previous"]
|
||||
spot_max_price_percentage_over_lowest_price = 100
|
||||
|
||||
vcpu_count = {
|
||||
min = 1
|
||||
}
|
||||
|
||||
allowed_instance_types = ["t*", "m*"]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
metadata_options = {
|
||||
http_endpoint = "enabled"
|
||||
http_tokens = "required"
|
||||
|
||||
Reference in New Issue
Block a user