Skip to content

Commit

Permalink
fix autoscaling
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyblasczyk committed Oct 9, 2024
1 parent f2c4fcb commit bf684f6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
1 change: 1 addition & 0 deletions examples/byo-vpc-sql/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ variable "bucket_kms_key_arn" {
default = ""
}


##########################################
# Redis #
##########################################
Expand Down
20 changes: 9 additions & 11 deletions modules/app_eks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,10 @@ module "eks" {

node_groups = {
for subnet in data.aws_subnet.private : regex(".*[[:digit:]]([[:alpha:]])", subnet.availability_zone)[0] => {
subnets = [subnet.id]
scaling_config = {
desired_capacity = var.min_nodes
max_capacity = var.max_nodes
min_capacity = var.min_nodes
}
subnets = [subnet.id]
desired_capacity = var.min_nodes
max_capacity = var.max_nodes
min_capacity = var.min_nodes
}
}

Expand All @@ -86,7 +84,7 @@ resource "kubernetes_annotations" "gp2" {
api_version = "storage.k8s.io/v1"
kind = "StorageClass"
force = "true"
depends_on = [module.eks]
depends_on = [module.eks]

metadata {
name = "gp2"
Expand All @@ -103,14 +101,14 @@ resource "kubernetes_storage_class" "gp3" {
"storageclass.kubernetes.io/is-default-class" = "true"
}
}
depends_on = [kubernetes_annotations.gp2]
depends_on = [kubernetes_annotations.gp2]
storage_provisioner = "kubernetes.io/aws-ebs"
parameters = {
fsType = "ext4"
type = "gp3"
type = "gp3"
}
reclaim_policy = "Delete"
volume_binding_mode = "WaitForFirstConsumer"
reclaim_policy = "Delete"
volume_binding_mode = "WaitForFirstConsumer"
allow_volume_expansion = true
}

Expand Down

0 comments on commit bf684f6

Please sign in to comment.