Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

Commit

Permalink
feat: use EKS addons to manage installation of coredns (#563)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrparkers authored Dec 10, 2021
1 parent 8d77609 commit 75ed461
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
8 changes: 8 additions & 0 deletions modules/environment/aws/eks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -262,3 +262,11 @@ resource "aws_s3_bucket" "tfstates" {
Cluster = var.cluster
}
}

resource "aws_eks_addon" "addon" {
for_each = var.cluster_addons
cluster_name = module.eks.cluster_id
addon_name = each.key
addon_version = each.value
resolve_conflicts = "OVERWRITE"
}
5 changes: 5 additions & 0 deletions modules/environment/aws/eks/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ variable "cluster_version" {
default = "1.14"
}

variable "cluster_addons" {
type = map(string)
default = {}
}

variable "codebuild_role" {
default = ""
}
Expand Down
1 change: 1 addition & 0 deletions stages/cloud-provider/aws/lead/eks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module "eks" {
region = var.region
cluster = var.cluster_name
cluster_version = var.cluster_version
cluster_addons = var.cluster_addons
key_name = var.key_name
preemptible_instance_types = var.instance_types
preemptible_asg_min_size = var.asg_min_size
Expand Down
6 changes: 6 additions & 0 deletions stages/cloud-provider/aws/lead/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ variable "cluster_version" {
description = "Kubernetes version running on EKS"
}

variable "cluster_addons" {
description = "EKS addons to install to the cluster"
type = map(string)
default = {}
}

variable "cluster_name" {
description = "Name of the cluster as seen in EKS"
}
Expand Down

0 comments on commit 75ed461

Please sign in to comment.