Skip to content

Commit

Permalink
fix: Switch to gp3 volumes on EKS nodes (#146)
Browse files Browse the repository at this point in the history
* feat: Switch to GP3 volumes, enable monitoring

* switch to gp3 volumes, use m7a instance type

* add m6a instance type

* Update variables.tf

* Update variables.tf
  • Loading branch information
George Scott authored Dec 7, 2023
1 parent 18ca7f1 commit 86dbc7d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
24 changes: 13 additions & 11 deletions modules/app_eks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,21 @@ module "eks" {

node_groups = {
primary = {
version = var.cluster_version,
desired_capacity = 2,
max_capacity = 5,
min_capacity = 2,
instance_types = var.instance_types,
iam_role_arn = aws_iam_role.node.arn,
create_launch_template = local.encrypt_ebs_volume,
disk_encrypted = local.encrypt_ebs_volume,
disk_kms_key_id = var.kms_key_arn,
force_update_version = local.encrypt_ebs_volume,
# IMDsv2
metadata_http_tokens = "required",
create_launch_template = local.encrypt_ebs_volume,
desired_capacity = 2,
disk_encrypted = local.encrypt_ebs_volume,
disk_kms_key_id = var.kms_key_arn,
disk_type = "gp3"
enable_monitoring = true
force_update_version = local.encrypt_ebs_volume,
iam_role_arn = aws_iam_role.node.arn,
instance_types = var.instance_types,
max_capacity = 5,
metadata_http_put_response_hop_limit = 2
metadata_http_tokens = "required",
min_capacity = 2,
version = var.cluster_version,
}
}

Expand Down
2 changes: 1 addition & 1 deletion modules/app_eks/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ variable "kms_key_arn" {

variable "instance_types" {
description = "EC2 Instance type for primary node group."
nullable = false
type = list(string)
default = ["m4.large"]
}

variable "lb_security_group_inbound_id" {
Expand Down

0 comments on commit 86dbc7d

Please sign in to comment.