Skip to content

Commit

Permalink
fix: Keep multi-repo consistent with single-repo for helm values conf…
Browse files Browse the repository at this point in the history
…iguration. (#1719)

Co-authored-by: Rodrigo Bersa <rodrigo.bersa@gmail.com>
  • Loading branch information
ajpaws and rodrigobersa authored Aug 13, 2023
1 parent f0ea692 commit 711525c
Showing 1 changed file with 110 additions and 101 deletions.
211 changes: 110 additions & 101 deletions examples/blue-green-upgrade/modules/eks_cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -113,128 +113,137 @@ locals {

apps = {
ecsdemoNodejs = {
replicaCount = "9"
nodeSelector = {
"karpenter.sh/provisioner-name" = "default"
}
tolerations = [
{
key = "karpenter"
operator = "Exists"
effect = "NoSchedule"

helm = {
replicaCount = "9"
nodeSelector = {
"karpenter.sh/provisioner-name" = "default"
}
]
topologyAwareHints = "true"
topologySpreadConstraints = [
{
maxSkew = 1
topologyKey = "topology.kubernetes.io/zone"
whenUnsatisfiable = "DoNotSchedule"
labelSelector = {
matchLabels = {
"app.kubernetes.io/name" = "ecsdemo-nodejs"
tolerations = [
{
key = "karpenter"
operator = "Exists"
effect = "NoSchedule"
}
]
topologyAwareHints = "true"
topologySpreadConstraints = [
{
maxSkew = 1
topologyKey = "topology.kubernetes.io/zone"
whenUnsatisfiable = "DoNotSchedule"
labelSelector = {
matchLabels = {
"app.kubernetes.io/name" = "ecsdemo-nodejs"
}
}
}
}
]
]
}
}

ecsdemoCrystal = {
replicaCount = "9"
nodeSelector = {
"karpenter.sh/provisioner-name" = "default"
}
tolerations = [
{
key = "karpenter"
operator = "Exists"
effect = "NoSchedule"

helm = {
replicaCount = "9"
nodeSelector = {
"karpenter.sh/provisioner-name" = "default"
}
]
topologyAwareHints = "true"
topologySpreadConstraints = [
{
maxSkew = 1
topologyKey = "topology.kubernetes.io/zone"
whenUnsatisfiable = "DoNotSchedule"
labelSelector = {
matchLabels = {
"app.kubernetes.io/name" = "ecsdemo-crystal"
tolerations = [
{
key = "karpenter"
operator = "Exists"
effect = "NoSchedule"
}
]
topologyAwareHints = "true"
topologySpreadConstraints = [
{
maxSkew = 1
topologyKey = "topology.kubernetes.io/zone"
whenUnsatisfiable = "DoNotSchedule"
labelSelector = {
matchLabels = {
"app.kubernetes.io/name" = "ecsdemo-crystal"
}
}
}
}
]
]
}
}


ecsdemoFrontend = {
repoURL = "https://github.com/allamand/ecsdemo-frontend"
targetRevision = "main"
image = {
repository = "public.ecr.aws/seb-demo/ecsdemo-frontend"
tag = "latest"
}
ingress = {
enabled = "true"
className = "alb"
annotations = {
"alb.ingress.kubernetes.io/scheme" = "internet-facing"
"alb.ingress.kubernetes.io/group.name" = "ecsdemo"
"alb.ingress.kubernetes.io/listen-ports" = "[{\\\"HTTPS\\\": 443}]"
"alb.ingress.kubernetes.io/ssl-redirect" = "443"
"alb.ingress.kubernetes.io/target-type" = "ip"
"external-dns.alpha.kubernetes.io/set-identifier" = local.name
"external-dns.alpha.kubernetes.io/aws-weight" = local.ecsfrontend_route53_weight
helm = {
image = {
repository = "public.ecr.aws/seb-demo/ecsdemo-frontend"
tag = "latest"
}
hosts = [
{
host = "frontend.${local.eks_cluster_domain}"
paths = [
{
path = "/"
pathType = "Prefix"
}
]
ingress = {
enabled = "true"
className = "alb"
annotations = {
"alb.ingress.kubernetes.io/scheme" = "internet-facing"
"alb.ingress.kubernetes.io/group.name" = "ecsdemo"
"alb.ingress.kubernetes.io/listen-ports" = "[{\\\"HTTPS\\\": 443}]"
"alb.ingress.kubernetes.io/ssl-redirect" = "443"
"alb.ingress.kubernetes.io/target-type" = "ip"
"external-dns.alpha.kubernetes.io/set-identifier" = local.name
"external-dns.alpha.kubernetes.io/aws-weight" = local.ecsfrontend_route53_weight
}
]
}
resources = {
requests = {
cpu = "1"
memory = "256Mi"
hosts = [
{
host = "frontend.${local.eks_cluster_domain}"
paths = [
{
path = "/"
pathType = "Prefix"
}
]
}
]
}
limits = {
cpu = "1"
memory = "512Mi"
resources = {
requests = {
cpu = "1"
memory = "256Mi"
}
limits = {
cpu = "1"
memory = "512Mi"
}
}
}
autoscaling = {
enabled = "true"
minReplicas = "9"
maxReplicas = "100"
targetCPUUtilizationPercentage = "60"
}
nodeSelector = {
"karpenter.sh/provisioner-name" = "default"
}
tolerations = [
{
key = "karpenter"
operator = "Exists"
effect = "NoSchedule"
autoscaling = {
enabled = "true"
minReplicas = "9"
maxReplicas = "100"
targetCPUUtilizationPercentage = "60"
}
nodeSelector = {
"karpenter.sh/provisioner-name" = "default"
}
]
topologySpreadConstraints = [
{
maxSkew = 1
topologyKey = "topology.kubernetes.io/zone"
whenUnsatisfiable = "DoNotSchedule"
labelSelector = {
matchLabels = {
"app.kubernetes.io/name" = "ecsdemo-frontend"
tolerations = [
{
key = "karpenter"
operator = "Exists"
effect = "NoSchedule"
}
]
topologySpreadConstraints = [
{
maxSkew = 1
topologyKey = "topology.kubernetes.io/zone"
whenUnsatisfiable = "DoNotSchedule"
labelSelector = {
matchLabels = {
"app.kubernetes.io/name" = "ecsdemo-frontend"
}
}
}
}
]
]
}
}
}
}
Expand Down

0 comments on commit 711525c

Please sign in to comment.