From 8ace456ebee291f8286b4f1562433a02b62f621f Mon Sep 17 00:00:00 2001 From: Khramtsov Valentin <42875838+kvvit@users.noreply.github.com> Date: Mon, 30 Sep 2024 09:20:55 +0300 Subject: [PATCH] fix: some fixes for karpenter deploy (#358) --- terraform/modules/k8s-karpenter/main.tf | 14 +++++--------- .../demo/common/aws-eks/.terraform.lock.hcl | 10 ++++++++-- .../demo/common/aws-vpc/.terraform.lock.hcl | 3 ++- terragrunt/ACCOUNT_ID/us-east-1/demo/env.yaml | 6 ++++++ .../us-east-1/demo/karpenter/.terraform.lock.hcl | 9 ++++++++- 5 files changed, 29 insertions(+), 13 deletions(-) diff --git a/terraform/modules/k8s-karpenter/main.tf b/terraform/modules/k8s-karpenter/main.tf index f9f4dec..ef0cf74 100644 --- a/terraform/modules/k8s-karpenter/main.tf +++ b/terraform/modules/k8s-karpenter/main.tf @@ -3,9 +3,9 @@ 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_version = try(var.helm.chart_version, "1.0.0") + 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.3") namespace = try(var.helm.namespace, "karpenter") } @@ -30,8 +30,6 @@ controller: VALUES } -data "aws_ecrpublic_authorization_token" "token" {} - module "this" { count = local.karpenter.enabled ? 1 : 0 @@ -66,7 +64,7 @@ resource "kubectl_manifest" "ec2nodeclass_private" { count = local.karpenter.enabled ? 1 : 0 yaml_body = <