diff --git a/terraform/modules/k8s-karpenter/main.tf b/terraform/modules/k8s-karpenter/main.tf index f9f4dec..50ebc86 100644 --- a/terraform/modules/k8s-karpenter/main.tf +++ b/terraform/modules/k8s-karpenter/main.tf @@ -3,8 +3,8 @@ locals { karpenter = { name = try(var.helm.release_name, "karpenter") enabled = true - chart = try(var.helm.chart_name, "karpenter") - repository = try(var.helm.repository, "oci://public.ecr.aws/karpenter") + chart = try(var.helm.chart_name, "oci://public.ecr.aws/karpenter/karpenter") + repository = try(var.helm.repository, "") chart_version = try(var.helm.chart_version, "1.0.0") namespace = try(var.helm.namespace, "karpenter") } @@ -19,6 +19,12 @@ serviceAccount: annotations: eks.amazonaws.com/role-arn: ${module.this[0].iam_role_arn} +postInstallHook: + image: + repository: bitnami/kubectl + tag: "1.30" + digest: sha256:c85f429088cea9ad968752e6d59e7edbc74b5750526f9a04531dce6b37f3ac87 + controller: resources: requests: @@ -30,8 +36,6 @@ controller: VALUES } -data "aws_ecrpublic_authorization_token" "token" {} - module "this" { count = local.karpenter.enabled ? 1 : 0 @@ -66,7 +70,7 @@ resource "kubectl_manifest" "ec2nodeclass_private" { count = local.karpenter.enabled ? 1 : 0 yaml_body = <