mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-03-12 21:35:15 +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:
@@ -26,14 +26,14 @@ Note that this example may create resources which cost money. Run `terraform des
|
||||
| Name | Version |
|
||||
|------|---------|
|
||||
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
|
||||
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.47 |
|
||||
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.57 |
|
||||
| <a name="requirement_kubernetes"></a> [kubernetes](#requirement\_kubernetes) | >= 2.10 |
|
||||
|
||||
## Providers
|
||||
|
||||
| Name | Version |
|
||||
|------|---------|
|
||||
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.47 |
|
||||
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.57 |
|
||||
|
||||
## Modules
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -4,7 +4,7 @@ terraform {
|
||||
required_providers {
|
||||
aws = {
|
||||
source = "hashicorp/aws"
|
||||
version = ">= 4.47"
|
||||
version = ">= 4.57"
|
||||
}
|
||||
kubernetes = {
|
||||
source = "hashicorp/kubernetes"
|
||||
|
||||
Reference in New Issue
Block a user