feat: Enable update in place for node groups with cluster placement group strategy (#3045)

* feat(eks):added subnet az filter for eks nodegroup placement groups

* fix: Correct logice for restricting placement group to AZ

* fix: Ensure node group args are passed from root module

---------

Co-authored-by: Bryant Biggs <bryantbiggs@gmail.com>
This commit is contained in:
Josephuss
2024-08-05 23:13:39 +08:00
committed by GitHub
parent bfa5821113
commit 75db486530
8 changed files with 97 additions and 25 deletions

View File

@@ -90,11 +90,16 @@ module "eks" {
}
}
placement_group = {
create_placement_group = true
# forces the subnet lookup to be restricted to this availability zone
placement_group_az = element(local.azs, 3)
}
# AL2023 node group utilizing new user data format which utilizes nodeadm
# to join nodes to the cluster (instead of /etc/eks/bootstrap.sh)
al2023_nodeadm = {
ami_type = "AL2023_x86_64_STANDARD"
ami_type = "AL2023_x86_64_STANDARD"
use_latest_ami_release_version = true
cloudinit_pre_nodeadm = [
@@ -376,9 +381,7 @@ module "eks_managed_node_group" {
subnet_ids = module.vpc.private_subnets
cluster_primary_security_group_id = module.eks.cluster_primary_security_group_id
vpc_security_group_ids = [
module.eks.node_security_group_id,
]
vpc_security_group_ids = [module.eks.node_security_group_id]
ami_type = "BOTTLEROCKET_x86_64"