Skip to content

Commit

Permalink
Include additional EKS add ons
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanFauble committed May 31, 2024
1 parent 2575e97 commit c41d25b
Showing 1 changed file with 24 additions and 5 deletions.
29 changes: 24 additions & 5 deletions modules/k8s-node-autoscaler/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ resource "aws_iam_role" "work_profile_iam_role" {
}


# resource "aws_iam_role_policy_attachment" "a1" {
# role = aws_iam_role.work_profile_iam_role.name
# policy_arn = "arn:aws:iam::aws:policy/AmazonEBSCSIDriverPolicy"
# }
resource "aws_iam_role_policy_attachment" "a1" {
role = aws_iam_role.work_profile_iam_role.name
policy_arn = "arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy"
}

resource "aws_iam_role_policy_attachment" "a2" {
role = aws_iam_role.work_profile_iam_role.name
Expand Down Expand Up @@ -53,7 +53,6 @@ resource "aws_iam_instance_profile" "profile" {
resource "aws_eks_access_entry" "example" {
cluster_name = var.cluster_name
principal_arn = aws_iam_role.work_profile_iam_role.arn
# kubernetes_groups = ["system:nodes"]
type = "EC2_LINUX"
tags = var.tags
}
Expand Down Expand Up @@ -85,3 +84,23 @@ module "ocean-aws-k8s" {
max_scale_down_percentage = 33
tags = var.tags
}

resource "aws_eks_addon" "coredns" {
cluster_name = var.cluster_name
addon_name = "coredns"

depends_on = [
module.ocean-controller,
module.ocean-aws-k8s,
]
}

resource "aws_eks_addon" "coredns" {
cluster_name = var.cluster_name
addon_name = "aws-ebs-csi-driver"

depends_on = [
module.ocean-controller,
module.ocean-aws-k8s,
]
}

0 comments on commit c41d25b

Please sign in to comment.