Skip to content

Commit

Permalink
Clean up under utilised worker groups in dev
Browse files Browse the repository at this point in the history
Remove and reshuffle containers for better infra utilisation in dev.

Bump resources for auto-scalar to avoid OOMKilled.
  • Loading branch information
masih committed Feb 27, 2024
1 parent 4cca7e9 commit ed7c7cb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 90 deletions.
65 changes: 0 additions & 65 deletions deploy/infrastructure/dev/us-east-2/eks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -70,71 +70,6 @@ module "eks" {
instance_types = ["m4.xlarge"]
subnet_ids = [data.aws_subnet.ue2c1.id, data.aws_subnet.ue2c2.id]
}

dev-ue2a-r5a-2xl = {
min_size = 1
max_size = 7
desired_size = 1
instance_types = ["r5a.2xlarge"]
subnet_ids = [data.aws_subnet.ue2a1.id, data.aws_subnet.ue2a2.id, data.aws_subnet.ue2a3.id]
}
# Used by foundation db
dev-ue2-r5a-2xl = {
min_size = 0
max_size = 15
desired_size = 1
instance_types = ["r5a.2xlarge"]
subnet_ids = [
data.aws_subnet.ue2a1.id, data.aws_subnet.ue2a2.id, data.aws_subnet.ue2a3.id,
data.aws_subnet.ue2b1.id, data.aws_subnet.ue2b2.id, data.aws_subnet.ue2b3.id,
data.aws_subnet.ue2c1.id, data.aws_subnet.ue2c2.id, data.aws_subnet.ue2c3.id,
]
}

# Memory optimised node groups primarily used to run indexer nodes.
dev-ue2a-r5n-2xl = {
min_size = 1
max_size = 5
desired_size = 1
instance_types = ["r5n.2xlarge"]
subnet_ids = [data.aws_subnet.ue2a2.id]
taints = {
dedicated = {
key = "dedicated"
value = "r5n-2xl"
effect = "NO_SCHEDULE"
}
}
}
dev-ue2b-r5n-2xl = {
min_size = 1
max_size = 5
desired_size = 1
instance_types = ["r5n.2xlarge"]
subnet_ids = [data.aws_subnet.ue2b2.id]
taints = {
dedicated = {
key = "dedicated"
value = "r5n-2xl"
effect = "NO_SCHEDULE"
}
}
}
dev-ue2c-r5n-2xl = {
min_size = 1
max_size = 5
desired_size = 1
instance_types = ["r5n.2xlarge"]
subnet_ids = [data.aws_subnet.ue2c2.id]
taints = {
dedicated = {
key = "dedicated"
value = "r5n-2xl"
effect = "NO_SCHEDULE"
}
}
}
}

tags = local.tags
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,10 @@ spec:
- --balance-similar-node-groups
- --scale-down-delay-after-add=90m
- --node-group-auto-discovery=asg:tag=k8s.io/cluster-autoscaler/enabled,k8s.io/cluster-autoscaler/dev
resources:
limits:
cpu: 100m
memory: 1Gi
requests:
cpu: 100m
memory: 1Gi
25 changes: 0 additions & 25 deletions deploy/manifests/dev/us-east-2/cluster/kube-system/aws-auth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,31 +39,6 @@ data:
- system:nodes
rolearn: arn:aws:iam::407967248065:role/dev-ue2c-r6a-xl-eks-node-group
username: system:node:{{EC2PrivateDNSName}}
- groups:
- system:bootstrappers
- system:nodes
rolearn: arn:aws:iam::407967248065:role/dev-ue2-r5a-2xl-eks-node-group
username: system:node:{{EC2PrivateDNSName}}
- groups:
- system:bootstrappers
- system:nodes
rolearn: arn:aws:iam::407967248065:role/dev-ue2a-r5a-2xl-eks-node-group
username: system:node:{{EC2PrivateDNSName}}
- groups:
- system:bootstrappers
- system:nodes
rolearn: arn:aws:iam::407967248065:role/dev-ue2a-r5n-2xl-eks-node-group
username: system:node:{{EC2PrivateDNSName}}
- groups:
- system:bootstrappers
- system:nodes
rolearn: arn:aws:iam::407967248065:role/dev-ue2b-r5n-2xl-eks-node-group
username: system:node:{{EC2PrivateDNSName}}
- groups:
- system:bootstrappers
- system:nodes
rolearn: arn:aws:iam::407967248065:role/dev-ue2c-r5n-2xl-eks-node-group
username: system:node:{{EC2PrivateDNSName}}
mapUsers: |
- userarn: arn:aws:iam::407967248065:user/masih
username: masih
Expand Down

0 comments on commit ed7c7cb

Please sign in to comment.