Skip to content

Commit

Permalink
Namespace consolidation (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcgin314 committed Mar 4, 2025
1 parent 22b267c commit 5cf4b69
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
locals {
namespace = "karpenter"
namespace = var.namespace
amd_ami_family = "Bottlerocket"
amd_ami_alias = "bottlerocket@latest"
}
Expand All @@ -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 = {
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5cf4b69

Please sign in to comment.