chore: Update examples for Fargate high availability (#2378)

This commit is contained in:
Bryant Biggs
2023-01-05 07:53:37 -05:00
committed by GitHub
parent 460e43db77
commit 21e26e9045
3 changed files with 61 additions and 56 deletions

View File

@@ -54,44 +54,48 @@ module "eks" {
}
}
fargate_profiles = {
example = {
name = "example"
selectors = [
{
namespace = "backend"
labels = {
Application = "backend"
}
},
{
namespace = "app-*"
labels = {
Application = "app-wildcard"
fargate_profiles = merge(
{
example = {
name = "example"
selectors = [
{
namespace = "backend"
labels = {
Application = "backend"
}
},
{
namespace = "app-*"
labels = {
Application = "app-wildcard"
}
}
]
# Using specific subnets instead of the subnets supplied for the cluster itself
subnet_ids = [module.vpc.private_subnets[1]]
tags = {
Owner = "secondary"
}
]
# Using specific subnets instead of the subnets supplied for the cluster itself
subnet_ids = [module.vpc.private_subnets[1]]
tags = {
Owner = "secondary"
timeouts = {
create = "20m"
delete = "20m"
}
}
timeouts = {
create = "20m"
delete = "20m"
},
{ for i in range(3) :
"kube-system-${element(split("-", local.azs[i]), 2)}" => {
selectors = [
{ namespace = "kube-system" }
]
# We want to create a profile per AZ for high availability
subnet_ids = element(module.vpc.private_subnets, i)
}
}
kube_system = {
name = "kube-system"
selectors = [
{ namespace = "kube-system" }
]
}
}
)
tags = local.tags
}