From da29ef49c1493e162635a554d0d4159564e4a3ca Mon Sep 17 00:00:00 2001 From: Edgar Costa Date: Sun, 2 Jun 2024 02:30:13 -0300 Subject: [PATCH] adding gatekeeper to a dedicated addon module --- bootstrap/terraform/main.tf | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/bootstrap/terraform/main.tf b/bootstrap/terraform/main.tf index 4f51e50e..ee6bea6f 100644 --- a/bootstrap/terraform/main.tf +++ b/bootstrap/terraform/main.tf @@ -159,12 +159,6 @@ module "eks_blueprints_addons" { crossplane_kubernetes_provider_enable = local.kubernetes_provider.enable })] } - enable_gatekeeper = true - gatekeeper = { - wait = true - wait_for_jobs = true - timeout = "600" - } enable_metrics_server = true enable_aws_load_balancer_controller = true @@ -180,6 +174,26 @@ module "eks_blueprints_addons" { depends_on = [module.eks.eks_managed_node_groups] } +#--------------------------------------------------------------- +# Gatekeeper +#--------------------------------------------------------------- +module "gatekeeper" { + source = "aws-ia/eks-blueprints-addon/aws" + version = "1.1.1" + + name = "gatekeeper" + description = "A Helm chart to deploy gatekeeper project" + namespace = "gatekeeper-system" + create_namespace = true + chart = "gatekeeper" + chart_version = "3.16.3" + repository = "https://open-policy-agent.github.io/gatekeeper/charts" + wait = true + timeout = "600" + + depends_on = [module.eks_blueprints_addons] +} + #--------------------------------------------------------------- # Crossplane #--------------------------------------------------------------- @@ -194,9 +208,11 @@ module "crossplane" { chart = "crossplane" chart_version = "1.16.0" repository = "https://charts.crossplane.io/stable/" + wait = true + timeout = "600" values = [file("${path.module}/values/crossplane.yaml")] - depends_on = [module.eks.eks_managed_node_groups] + depends_on = [module.eks_blueprints_addons] } resource "kubectl_manifest" "environmentconfig" {