diff --git a/main.tf b/main.tf index 5e5818e..59c8cd0 100644 --- a/main.tf +++ b/main.tf @@ -1,5 +1,5 @@ locals { - namespace = "karpenter" + namespace = var.namespace amd_ami_family = "Bottlerocket" amd_ami_alias = "bottlerocket@latest" } @@ -12,7 +12,7 @@ module "karpenter_resources" { cluster_name = var.cluster_name enable_irsa = true irsa_oidc_provider_arn = var.oidc_provider_arn - create_pod_identity_association = true + irsa_namespace_service_accounts = ["${local.namespace}:karpenter"] # Attach additional IAM policies to the Karpenter node IAM role node_iam_role_additional_policies = { diff --git a/variables.tf b/variables.tf index bd99185..85e1724 100644 --- a/variables.tf +++ b/variables.tf @@ -48,6 +48,12 @@ variable "karpenter_tag" { default = "1.1.1" } +variable "namespace" { + description = "Namespace in which to install cert manager" + type = string + default = "kube-system" +} + variable "subnets_name" { description = "Define the name of the subnets to be used by this cluster" type = string