From 86329c1792058179dc6c73e484209da704b98815 Mon Sep 17 00:00:00 2001 From: Khalezin Dmitrii Date: Thu, 29 Jul 2021 13:54:36 +0600 Subject: [PATCH 1/8] #73 added module for alb-ingress-controller --- .../layer2-k8s/eks-alb-ingress-controller.tf | 11 +++ .../examples/eks-alb-ingress-controller.tf | 32 --------- terraform/layer2-k8s/variables.tf | 12 ++-- terraform/modules/eks-alb-ingress/README.md | 43 ++++++++++++ terraform/modules/eks-alb-ingress/locals.tf | 10 +++ terraform/modules/eks-alb-ingress/main.tf | 19 ++++++ .../modules/eks-alb-ingress/variables.tf | 67 +++++++++++++++++++ 7 files changed, 154 insertions(+), 40 deletions(-) create mode 100644 terraform/layer2-k8s/eks-alb-ingress-controller.tf delete mode 100644 terraform/layer2-k8s/examples/eks-alb-ingress-controller.tf create mode 100644 terraform/modules/eks-alb-ingress/README.md create mode 100644 terraform/modules/eks-alb-ingress/locals.tf create mode 100644 terraform/modules/eks-alb-ingress/main.tf create mode 100644 terraform/modules/eks-alb-ingress/variables.tf diff --git a/terraform/layer2-k8s/eks-alb-ingress-controller.tf b/terraform/layer2-k8s/eks-alb-ingress-controller.tf new file mode 100644 index 00000000..2db8466a --- /dev/null +++ b/terraform/layer2-k8s/eks-alb-ingress-controller.tf @@ -0,0 +1,11 @@ +module "eks_alb_ingress" { + source = "./modules/eks-alb-ingress" + count = var.alb_ingress_enable ? 1 : 0 + + name = local.name + region = local.region + oidc_provider_arn = local.eks_oidc_provider_arn + eks_cluster_id = local.eks_cluster_id + vpc_id = local.vpc_id + namespace = kubernetes_namespace.ing.id +} diff --git a/terraform/layer2-k8s/examples/eks-alb-ingress-controller.tf b/terraform/layer2-k8s/examples/eks-alb-ingress-controller.tf deleted file mode 100644 index 4be7d404..00000000 --- a/terraform/layer2-k8s/examples/eks-alb-ingress-controller.tf +++ /dev/null @@ -1,32 +0,0 @@ -module "aws_iam_alb_ingress_controller" { - source = "../modules/aws-iam-alb-ingress-controller" - - name = local.name - region = local.region - oidc_provider_arn = local.eks_oidc_provider_arn -} - -data "template_file" "alb_ingress_controller" { - template = file("${path.module}/templates/alb-ingress-controller-values.yaml") - - vars = { - role_arn = module.aws_iam_alb_ingress_controller.role_arn - region = local.region - cluster_name = local.eks_cluster_id - vpc_id = local.vpc_id - image_tag = var.alb_ingress_image_tag - } -} - -resource "helm_release" "alb_ingress_controller" { - name = "aws-alb-ingress-controller" - chart = "aws-alb-ingress-controller" - repository = local.helm_repo_incubator - version = var.alb_ingress_chart_version - namespace = kubernetes_namespace.ing.id - max_history = var.helm_release_history_size - - values = [ - data.template_file.alb_ingress_controller.rendered - ] -} diff --git a/terraform/layer2-k8s/variables.tf b/terraform/layer2-k8s/variables.tf index 7f4cbd1a..815f7311 100644 --- a/terraform/layer2-k8s/variables.tf +++ b/terraform/layer2-k8s/variables.tf @@ -60,14 +60,10 @@ variable "nginx_ingress_ssl_terminator" { } # ALB Ingress -variable "alb_ingress_image_tag" { - description = "Tag of docker image for alb-ingress controller" - default = "v1.1.5" -} - -variable "alb_ingress_chart_version" { - description = "Version of alb-ingress helm chart" - default = "1.0.4" +variable "alb_ingress_enable" { + description = "Disable or Enable alb-ingress" + type = bool + default = false } # Cluster autoscaler diff --git a/terraform/modules/eks-alb-ingress/README.md b/terraform/modules/eks-alb-ingress/README.md new file mode 100644 index 00000000..69d33703 --- /dev/null +++ b/terraform/modules/eks-alb-ingress/README.md @@ -0,0 +1,43 @@ +## Requirements + +No requirements. + +## Providers + +| Name | Version | +|------|---------| +| [helm](#provider\_helm) | n/a | + +## Modules + +| Name | Source | Version | +|------|--------|---------| +| [aws\_iam\_alb\_ingress\_controller](#module\_aws\_iam\_alb\_ingress\_controller) | ../aws-iam-alb-ingress-controller | n/a | + +## Resources + +| Name | Type | +|------|------| +| [helm_release.alb_ingress_controller](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [alb\_ingress\_image\_tag](#input\_alb\_ingress\_image\_tag) | chart version alb ingress | `string` | `"1.2.3"` | no | +| [aws-load-balancer-controller](#input\_aws-load-balancer-controller) | Helm Release name | `string` | `"aws-load-balancer-controller"` | no | +| [chart\_name](#input\_chart\_name) | Helm Chart name | `string` | `"aws-load-balancer-controller"` | no | +| [chart\_version](#input\_chart\_version) | Chart version repository name | `string` | `"aws-alb-ingress-controller"` | no | +| [eks\_cluster\_id](#input\_eks\_cluster\_id) | EKC identity cluster | `string` | `""` | no | +| [max\_history](#input\_max\_history) | How much helm releases to store | `string` | `"5"` | no | +| [name](#input\_name) | Project name, required to create unique resource names | `string` | `""` | no | +| [namespace](#input\_namespace) | Name of kubernetes namespace for alb\_ingres | `string` | `""` | no | +| [oidc\_provider\_arn](#input\_oidc\_provider\_arn) | ARN of EKS oidc provider | `string` | `""` | no | +| [region](#input\_region) | eks infrastructure region | `string` | `""` | no | +| [repository](#input\_repository) | Repository name for eks | `string` | `"https://aws.github.io/eks-charts"` | no | +| [values](#input\_values) | helm chat template file | `map(any)` | `{}` | no | +| [vpc\_id](#input\_vpc\_id) | EKS cluster vps identity | `string` | `""` | no | + +## Outputs + +No outputs. diff --git a/terraform/modules/eks-alb-ingress/locals.tf b/terraform/modules/eks-alb-ingress/locals.tf new file mode 100644 index 00000000..5fc96d3b --- /dev/null +++ b/terraform/modules/eks-alb-ingress/locals.tf @@ -0,0 +1,10 @@ +locals { + alb_ingress_controller = templatefile("${path.module}/templates/alb-ingress-controller-values.yaml", + { + role_arn = module.aws_iam_alb_ingress_controller.role_arn, + region = var.region, + cluster_name = var.eks_cluster_id, + vpc_id = var.vpc_id, + image_tag = var.alb_ingress_image_tag, + }) +} diff --git a/terraform/modules/eks-alb-ingress/main.tf b/terraform/modules/eks-alb-ingress/main.tf new file mode 100644 index 00000000..1f694524 --- /dev/null +++ b/terraform/modules/eks-alb-ingress/main.tf @@ -0,0 +1,19 @@ +module "aws_iam_alb_ingress_controller" { + source = "../aws-iam-alb-ingress-controller" + name = var.name + region = var.region + oidc_provider_arn = var.oidc_provider_arn +} + +resource "helm_release" "alb_ingress_controller" { + name = var.release_name + chart = var.chart_name + repository = var.repository + version = var.chart_version + namespace = var.namespace + create_namespace = true + max_history = var.max_history + values = [ + local.alb_ingress_controller + ] +} diff --git a/terraform/modules/eks-alb-ingress/variables.tf b/terraform/modules/eks-alb-ingress/variables.tf new file mode 100644 index 00000000..1deddfb2 --- /dev/null +++ b/terraform/modules/eks-alb-ingress/variables.tf @@ -0,0 +1,67 @@ +variable "name" { + description = "Project name, required to create unique resource names" + type = string + default = "" +} +variable "region" { + description = "eks infrastructure region" + type = string + default = "" +} +variable "oidc_provider_arn" { + description = "ARN of EKS oidc provider" + type = string + default = "" +} +variable "release_name" { + description = "Helm Release name" + type = string + default = "aws-load-balancer-controller" +} +variable "chart_name" { + description = "Helm Chart name" + type = string + default = "aws-load-balancer-controller" +} +variable "repository" { + description = "Repository name for eks" + type = string + default = "https://aws.github.io/eks-charts" +} +variable "chart_version" { + description = "Chart version repository name" + type = string + default = "aws-alb-ingress-controller" +} +variable "namespace" { + description = "Name of kubernetes namespace for alb_ingres" + type = string + default = "" +} +variable "max_history" { + description = "How much helm releases to store" + type = number + default = "5" +} + +variable "values" { + description = "helm chat template file" + type = map(any) + default = {} +} +variable "eks_cluster_id" { + description = "EKC identity cluster" + type = string + default = "" +} + +variable "vpc_id" { + description = "EKS cluster vps identity" + type = string + default = "" +} +variable "alb_ingress_image_tag" { + description = "chart version alb ingress" + type = string + default = "1.2.3" +} From c21f9e8475d2e2402efeb7ee303c61851d283efe Mon Sep 17 00:00:00 2001 From: Khalezin Dmitrii Date: Thu, 29 Jul 2021 14:02:37 +0600 Subject: [PATCH 2/8] #73 added template file --- .../alb-ingress-controller-values.yaml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 terraform/modules/eks-alb-ingress/templates/alb-ingress-controller-values.yaml diff --git a/terraform/modules/eks-alb-ingress/templates/alb-ingress-controller-values.yaml b/terraform/modules/eks-alb-ingress/templates/alb-ingress-controller-values.yaml new file mode 100644 index 00000000..1e84aada --- /dev/null +++ b/terraform/modules/eks-alb-ingress/templates/alb-ingress-controller-values.yaml @@ -0,0 +1,23 @@ +clusterName: ${cluster_name} +awsRegion: ${region} + +awsVpcID: ${vpc_id} + +rbac: + create: true + serviceAccountName: "alb-ingress" + serviceAccountAnnotations: + "eks.amazonaws.com/role-arn": ${role_arn} + +image: + tag: ${image_tag} + +affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: node.kubernetes.io/lifecycle + operator: In + values: + - ondemand From 5356b3b8651b89cc93ebc23d0f804df8c0a78046 Mon Sep 17 00:00:00 2001 From: Khalezin Dmitrii Date: Thu, 29 Jul 2021 14:08:25 +0600 Subject: [PATCH 3/8] #73 fixed path to module --- terraform/layer2-k8s/eks-alb-ingress-controller.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/layer2-k8s/eks-alb-ingress-controller.tf b/terraform/layer2-k8s/eks-alb-ingress-controller.tf index 2db8466a..2c0b0575 100644 --- a/terraform/layer2-k8s/eks-alb-ingress-controller.tf +++ b/terraform/layer2-k8s/eks-alb-ingress-controller.tf @@ -1,5 +1,5 @@ module "eks_alb_ingress" { - source = "./modules/eks-alb-ingress" + source = "../modules/eks-alb-ingress" count = var.alb_ingress_enable ? 1 : 0 name = local.name From af25caf509c1524a221373bd0b93f780bd499845 Mon Sep 17 00:00:00 2001 From: Khalezin Dmitrii Date: Thu, 29 Jul 2021 14:13:27 +0600 Subject: [PATCH 4/8] #73 fixed namespace variable --- terraform/layer2-k8s/eks-alb-ingress-controller.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/layer2-k8s/eks-alb-ingress-controller.tf b/terraform/layer2-k8s/eks-alb-ingress-controller.tf index 2c0b0575..d2bc2588 100644 --- a/terraform/layer2-k8s/eks-alb-ingress-controller.tf +++ b/terraform/layer2-k8s/eks-alb-ingress-controller.tf @@ -7,5 +7,5 @@ module "eks_alb_ingress" { oidc_provider_arn = local.eks_oidc_provider_arn eks_cluster_id = local.eks_cluster_id vpc_id = local.vpc_id - namespace = kubernetes_namespace.ing.id + namespace = module.ing_namespace.name } From 2ed8875fbb2870722771f646b9d872f59349cba6 Mon Sep 17 00:00:00 2001 From: Andrew S Date: Thu, 5 Aug 2021 16:18:38 +0600 Subject: [PATCH 5/8] #73 Renamed loadbalancer controller module, fixed image tag and iam module name --- ....tf => eks-aws-loadbalancer-controller.tf} | 0 .../aws-iam-alb-ingress-controller/iam.tf | 144 ----------- .../iam.tf | 240 ++++++++++++++++++ .../outputs.tf | 0 .../variables.tf | 0 terraform/modules/eks-alb-ingress/README.md | 43 ---- terraform/modules/eks-alb-ingress/locals.tf | 10 - .../eks-aws-loadbalancer-controller/README.md | 33 +++ .../eks-aws-loadbalancer-controller/locals.tf | 11 + .../main.tf | 6 +- .../alb-ingress-controller-values.yaml | 11 +- .../variables.tf | 12 +- 12 files changed, 302 insertions(+), 208 deletions(-) rename terraform/layer2-k8s/{eks-alb-ingress-controller.tf => eks-aws-loadbalancer-controller.tf} (100%) delete mode 100644 terraform/modules/aws-iam-alb-ingress-controller/iam.tf create mode 100644 terraform/modules/aws-iam-aws-loadbalancer-controller/iam.tf rename terraform/modules/{aws-iam-alb-ingress-controller => aws-iam-aws-loadbalancer-controller}/outputs.tf (100%) rename terraform/modules/{aws-iam-alb-ingress-controller => aws-iam-aws-loadbalancer-controller}/variables.tf (100%) delete mode 100644 terraform/modules/eks-alb-ingress/README.md delete mode 100644 terraform/modules/eks-alb-ingress/locals.tf create mode 100644 terraform/modules/eks-aws-loadbalancer-controller/README.md create mode 100644 terraform/modules/eks-aws-loadbalancer-controller/locals.tf rename terraform/modules/{eks-alb-ingress => eks-aws-loadbalancer-controller}/main.tf (71%) rename terraform/modules/{eks-alb-ingress => eks-aws-loadbalancer-controller}/templates/alb-ingress-controller-values.yaml (76%) rename terraform/modules/{eks-alb-ingress => eks-aws-loadbalancer-controller}/variables.tf (88%) diff --git a/terraform/layer2-k8s/eks-alb-ingress-controller.tf b/terraform/layer2-k8s/eks-aws-loadbalancer-controller.tf similarity index 100% rename from terraform/layer2-k8s/eks-alb-ingress-controller.tf rename to terraform/layer2-k8s/eks-aws-loadbalancer-controller.tf diff --git a/terraform/modules/aws-iam-alb-ingress-controller/iam.tf b/terraform/modules/aws-iam-alb-ingress-controller/iam.tf deleted file mode 100644 index 2086aa92..00000000 --- a/terraform/modules/aws-iam-alb-ingress-controller/iam.tf +++ /dev/null @@ -1,144 +0,0 @@ -resource "aws_iam_role" "this" { - name_prefix = "${var.name}-alb-ingress" - assume_role_policy = < [helm](#provider\_helm) | n/a | - -## Modules - -| Name | Source | Version | -|------|--------|---------| -| [aws\_iam\_alb\_ingress\_controller](#module\_aws\_iam\_alb\_ingress\_controller) | ../aws-iam-alb-ingress-controller | n/a | - -## Resources - -| Name | Type | -|------|------| -| [helm_release.alb_ingress_controller](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource | - -## Inputs - -| Name | Description | Type | Default | Required | -|------|-------------|------|---------|:--------:| -| [alb\_ingress\_image\_tag](#input\_alb\_ingress\_image\_tag) | chart version alb ingress | `string` | `"1.2.3"` | no | -| [aws-load-balancer-controller](#input\_aws-load-balancer-controller) | Helm Release name | `string` | `"aws-load-balancer-controller"` | no | -| [chart\_name](#input\_chart\_name) | Helm Chart name | `string` | `"aws-load-balancer-controller"` | no | -| [chart\_version](#input\_chart\_version) | Chart version repository name | `string` | `"aws-alb-ingress-controller"` | no | -| [eks\_cluster\_id](#input\_eks\_cluster\_id) | EKC identity cluster | `string` | `""` | no | -| [max\_history](#input\_max\_history) | How much helm releases to store | `string` | `"5"` | no | -| [name](#input\_name) | Project name, required to create unique resource names | `string` | `""` | no | -| [namespace](#input\_namespace) | Name of kubernetes namespace for alb\_ingres | `string` | `""` | no | -| [oidc\_provider\_arn](#input\_oidc\_provider\_arn) | ARN of EKS oidc provider | `string` | `""` | no | -| [region](#input\_region) | eks infrastructure region | `string` | `""` | no | -| [repository](#input\_repository) | Repository name for eks | `string` | `"https://aws.github.io/eks-charts"` | no | -| [values](#input\_values) | helm chat template file | `map(any)` | `{}` | no | -| [vpc\_id](#input\_vpc\_id) | EKS cluster vps identity | `string` | `""` | no | - -## Outputs - -No outputs. diff --git a/terraform/modules/eks-alb-ingress/locals.tf b/terraform/modules/eks-alb-ingress/locals.tf deleted file mode 100644 index 5fc96d3b..00000000 --- a/terraform/modules/eks-alb-ingress/locals.tf +++ /dev/null @@ -1,10 +0,0 @@ -locals { - alb_ingress_controller = templatefile("${path.module}/templates/alb-ingress-controller-values.yaml", - { - role_arn = module.aws_iam_alb_ingress_controller.role_arn, - region = var.region, - cluster_name = var.eks_cluster_id, - vpc_id = var.vpc_id, - image_tag = var.alb_ingress_image_tag, - }) -} diff --git a/terraform/modules/eks-aws-loadbalancer-controller/README.md b/terraform/modules/eks-aws-loadbalancer-controller/README.md new file mode 100644 index 00000000..00674e70 --- /dev/null +++ b/terraform/modules/eks-aws-loadbalancer-controller/README.md @@ -0,0 +1,33 @@ +## Requirements + +No requirements. + +## Providers + +| Name | Version | +|------|---------| +| helm | n/a | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| chart\_name | Helm Chart name | `string` | `"aws-load-balancer-controller"` | no | +| chart\_version | Chart version repository name | `string` | `"1.2.6"` | no | +| eks\_cluster\_id | EKC identity cluster | `string` | `""` | no | +| image\_tag | chart version alb ingress | `string` | `"v2.2.3"` | no | +| max\_history | How much helm releases to store | `number` | `"5"` | no | +| name | Project name, required to create unique resource names | `string` | `""` | no | +| namespace | Name of kubernetes namespace for alb\_ingres | `string` | `""` | no | +| oidc\_provider\_arn | ARN of EKS oidc provider | `string` | `""` | no | +| region | eks infrastructure region | `string` | `""` | no | +| release\_name | Helm Release name | `string` | `"aws-load-balancer-controller"` | no | +| replica\_count | Default number of replicas | `number` | `1` | no | +| repository | Repository name for eks | `string` | `"https://aws.github.io/eks-charts"` | no | +| values | helm chat template file | `map(any)` | `{}` | no | +| vpc\_id | EKS cluster vps identity | `string` | `""` | no | + +## Outputs + +No output. + diff --git a/terraform/modules/eks-aws-loadbalancer-controller/locals.tf b/terraform/modules/eks-aws-loadbalancer-controller/locals.tf new file mode 100644 index 00000000..51d33790 --- /dev/null +++ b/terraform/modules/eks-aws-loadbalancer-controller/locals.tf @@ -0,0 +1,11 @@ +locals { + alb_ingress_controller = templatefile("${path.module}/templates/alb-ingress-controller-values.yaml", + { + role_arn = module.aws_iam_aws_loadbalancer_controller.role_arn, + region = var.region, + cluster_name = var.eks_cluster_id, + vpc_id = var.vpc_id, + image_tag = var.image_tag, + replica_count = var.replica_count, + }) +} diff --git a/terraform/modules/eks-alb-ingress/main.tf b/terraform/modules/eks-aws-loadbalancer-controller/main.tf similarity index 71% rename from terraform/modules/eks-alb-ingress/main.tf rename to terraform/modules/eks-aws-loadbalancer-controller/main.tf index 1f694524..8ab0696d 100644 --- a/terraform/modules/eks-alb-ingress/main.tf +++ b/terraform/modules/eks-aws-loadbalancer-controller/main.tf @@ -1,11 +1,11 @@ -module "aws_iam_alb_ingress_controller" { - source = "../aws-iam-alb-ingress-controller" +module "aws_iam_aws_loadbalancer_controller" { + source = "../aws-iam-aws-loadbalancer-controller" name = var.name region = var.region oidc_provider_arn = var.oidc_provider_arn } -resource "helm_release" "alb_ingress_controller" { +resource "helm_release" "aws_loadbalancer_controller" { name = var.release_name chart = var.chart_name repository = var.repository diff --git a/terraform/modules/eks-alb-ingress/templates/alb-ingress-controller-values.yaml b/terraform/modules/eks-aws-loadbalancer-controller/templates/alb-ingress-controller-values.yaml similarity index 76% rename from terraform/modules/eks-alb-ingress/templates/alb-ingress-controller-values.yaml rename to terraform/modules/eks-aws-loadbalancer-controller/templates/alb-ingress-controller-values.yaml index 1e84aada..42807433 100644 --- a/terraform/modules/eks-alb-ingress/templates/alb-ingress-controller-values.yaml +++ b/terraform/modules/eks-aws-loadbalancer-controller/templates/alb-ingress-controller-values.yaml @@ -1,12 +1,13 @@ +replicaCount: ${replica_count} + clusterName: ${cluster_name} -awsRegion: ${region} -awsVpcID: ${vpc_id} +region: ${region} +vpcId: ${vpc_id} -rbac: +serviceAccount: create: true - serviceAccountName: "alb-ingress" - serviceAccountAnnotations: + annotations: "eks.amazonaws.com/role-arn": ${role_arn} image: diff --git a/terraform/modules/eks-alb-ingress/variables.tf b/terraform/modules/eks-aws-loadbalancer-controller/variables.tf similarity index 88% rename from terraform/modules/eks-alb-ingress/variables.tf rename to terraform/modules/eks-aws-loadbalancer-controller/variables.tf index 1deddfb2..de8f1e3f 100644 --- a/terraform/modules/eks-alb-ingress/variables.tf +++ b/terraform/modules/eks-aws-loadbalancer-controller/variables.tf @@ -31,7 +31,7 @@ variable "repository" { variable "chart_version" { description = "Chart version repository name" type = string - default = "aws-alb-ingress-controller" + default = "1.2.6" } variable "namespace" { description = "Name of kubernetes namespace for alb_ingres" @@ -60,8 +60,14 @@ variable "vpc_id" { type = string default = "" } -variable "alb_ingress_image_tag" { +variable "image_tag" { description = "chart version alb ingress" type = string - default = "1.2.3" + default = "v2.2.3" +} + +variable "replica_count" { + description = "Default number of replicas" + type = number + default = 1 } From cc373d14c6266d63af18e9cb130d873f3aedf835 Mon Sep 17 00:00:00 2001 From: Andrew S Date: Thu, 5 Aug 2021 16:19:22 +0600 Subject: [PATCH 6/8] #73 updated loc files --- terraform/layer1-aws/.terraform.lock.hcl | 2 ++ terraform/layer2-k8s/.terraform.lock.hcl | 3 +++ 2 files changed, 5 insertions(+) diff --git a/terraform/layer1-aws/.terraform.lock.hcl b/terraform/layer1-aws/.terraform.lock.hcl index 2c58d4ce..b129a238 100644 --- a/terraform/layer1-aws/.terraform.lock.hcl +++ b/terraform/layer1-aws/.terraform.lock.hcl @@ -6,6 +6,7 @@ provider "registry.terraform.io/hashicorp/aws" { constraints = ">= 2.49.0, >= 2.53.0, >= 3.10.0, >= 3.22.0, 3.38.0" hashes = [ "h1:ARuS11ThIcUfmAQKWNXGPLOa1GheaIwkeCnMh9Mjvao=", + "h1:qKEjN/EM56XT46vGY33eoq7nD6JuGqRqFp7tkzTrRM0=", "zh:20476d4c1b0c0efc55226bcbd85fbd948638fd9860a0edcdb7875cbb2b449e46", "zh:7102622e6549cc3fc46b9ad68cbf4c50b162ce1013d4da817d05d1edf1f12fae", "zh:74ff7f1610065e14c043cd9d74b3d5e0de4474f09a1a81e0b126b920b5cf6a27", @@ -25,6 +26,7 @@ provider "registry.terraform.io/hashicorp/kubernetes" { constraints = ">= 1.11.1, 2.1.0" hashes = [ "h1:8RC6upWV190+kE3+rYI4HuSouBUOfOXwV5GvIEXW4nk=", + "h1:L/3XfqLQ4bS1PjH/FksJPm+MYIOxCwn97ozbfSwg/VQ=", "zh:22e2bcef08fb7f97ed503a27e3725d9d14fdd09fe3aa144fae8a7f78ed27856a", "zh:2380cc2a91239b80ea380af8a7fcdcc7396f5213a71a251a5505c962ac6cb9c2", "zh:496ea2818d5480590ada763672be051f4e76dc12c6a61fde2faa0c909e174eb7", diff --git a/terraform/layer2-k8s/.terraform.lock.hcl b/terraform/layer2-k8s/.terraform.lock.hcl index 6a3a2abb..65b3b6c0 100644 --- a/terraform/layer2-k8s/.terraform.lock.hcl +++ b/terraform/layer2-k8s/.terraform.lock.hcl @@ -6,6 +6,7 @@ provider "registry.terraform.io/hashicorp/aws" { constraints = "3.38.0" hashes = [ "h1:ARuS11ThIcUfmAQKWNXGPLOa1GheaIwkeCnMh9Mjvao=", + "h1:qKEjN/EM56XT46vGY33eoq7nD6JuGqRqFp7tkzTrRM0=", "zh:20476d4c1b0c0efc55226bcbd85fbd948638fd9860a0edcdb7875cbb2b449e46", "zh:7102622e6549cc3fc46b9ad68cbf4c50b162ce1013d4da817d05d1edf1f12fae", "zh:74ff7f1610065e14c043cd9d74b3d5e0de4474f09a1a81e0b126b920b5cf6a27", @@ -42,6 +43,7 @@ provider "registry.terraform.io/hashicorp/helm" { version = "2.1.2" constraints = "2.1.2" hashes = [ + "h1:UVuNjmuEM4ZVtItbh1QRGulkBWxDY929roxFQhEf9Ks=", "h1:axFN2JRP+iDo8EAhCfnA3fRUCB5S5x4zCKkivWLNN+Y=", "zh:09bd2b6f33a040c3fd59d82c9768b886b8c82163e31ec92dc1b747229d0548df", "zh:09f209fa57ad5d01f04c458f1719b42958ca5e0fc2eca63d9ec29f92c77a29f8", @@ -62,6 +64,7 @@ provider "registry.terraform.io/hashicorp/kubernetes" { constraints = "2.1.0" hashes = [ "h1:8RC6upWV190+kE3+rYI4HuSouBUOfOXwV5GvIEXW4nk=", + "h1:L/3XfqLQ4bS1PjH/FksJPm+MYIOxCwn97ozbfSwg/VQ=", "zh:22e2bcef08fb7f97ed503a27e3725d9d14fdd09fe3aa144fae8a7f78ed27856a", "zh:2380cc2a91239b80ea380af8a7fcdcc7396f5213a71a251a5505c962ac6cb9c2", "zh:496ea2818d5480590ada763672be051f4e76dc12c6a61fde2faa0c909e174eb7", From 8b1b672bec7790ff6c4b06f4b38a97f41d64d8bf Mon Sep 17 00:00:00 2001 From: Andrew S Date: Thu, 5 Aug 2021 16:20:27 +0600 Subject: [PATCH 7/8] #73 changed aws loadbalancer variable name --- terraform/layer2-k8s/variables.tf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/terraform/layer2-k8s/variables.tf b/terraform/layer2-k8s/variables.tf index 815f7311..f0acf4c3 100644 --- a/terraform/layer2-k8s/variables.tf +++ b/terraform/layer2-k8s/variables.tf @@ -60,10 +60,10 @@ variable "nginx_ingress_ssl_terminator" { } # ALB Ingress -variable "alb_ingress_enable" { - description = "Disable or Enable alb-ingress" +variable "aws_loadbalancer_controller_enable" { + description = "Disable or Enable aws-loadbalancer-controller" type = bool - default = false + default = true } # Cluster autoscaler From ece86f8edcab89a31646c311980747074c98f6d6 Mon Sep 17 00:00:00 2001 From: Andrew S Date: Thu, 5 Aug 2021 16:20:59 +0600 Subject: [PATCH 8/8] #73 changed aws loadbalancer module name --- terraform/layer2-k8s/eks-aws-loadbalancer-controller.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/terraform/layer2-k8s/eks-aws-loadbalancer-controller.tf b/terraform/layer2-k8s/eks-aws-loadbalancer-controller.tf index d2bc2588..840b2c18 100644 --- a/terraform/layer2-k8s/eks-aws-loadbalancer-controller.tf +++ b/terraform/layer2-k8s/eks-aws-loadbalancer-controller.tf @@ -1,6 +1,6 @@ module "eks_alb_ingress" { - source = "../modules/eks-alb-ingress" - count = var.alb_ingress_enable ? 1 : 0 + source = "../modules/eks-aws-loadbalancer-controller" + count = var.aws_loadbalancer_controller_enable ? 1 : 0 name = local.name region = local.region