diff --git a/{{cookiecutter.github_repo_name}}/doc/terraform-init-stack.png b/{{cookiecutter.github_repo_name}}/doc/terraform-init-stack.png index 8ae13542..063ce453 100644 Binary files a/{{cookiecutter.github_repo_name}}/doc/terraform-init-stack.png and b/{{cookiecutter.github_repo_name}}/doc/terraform-init-stack.png differ diff --git a/{{cookiecutter.github_repo_name}}/terraform/stacks/modules/kubernetes_karpenter/main.tf b/{{cookiecutter.github_repo_name}}/terraform/stacks/modules/kubernetes_karpenter/main.tf index ad30948d..6ef9d6f5 100644 --- a/{{cookiecutter.github_repo_name}}/terraform/stacks/modules/kubernetes_karpenter/main.tf +++ b/{{cookiecutter.github_repo_name}}/terraform/stacks/modules/kubernetes_karpenter/main.tf @@ -53,7 +53,7 @@ module "karpenter_controller_irsa_role" { resource "helm_release" "karpenter" { - namespace = "monitoring" + namespace = "karpenter" create_namespace = true name = "karpenter" @@ -159,7 +159,7 @@ resource "aws_iam_role_policy_attachment" "ec2_spot_fleet_tagging" { } resource "kubectl_manifest" "vpa-karpenter" { - yaml_body = file("${path.module}/yml/verticalpodautoscalers/vpa-karpenter.yaml") + yaml_body = file("${path.module}/yml/vpa-karpenter.yaml") depends_on = [ helm_release.karpenter diff --git a/{{cookiecutter.github_repo_name}}/terraform/stacks/modules/kubernetes_karpenter/verticalpodautoscalers.tf b/{{cookiecutter.github_repo_name}}/terraform/stacks/modules/kubernetes_karpenter/verticalpodautoscalers.tf index a5ac6ebc..4e7095e1 100644 --- a/{{cookiecutter.github_repo_name}}/terraform/stacks/modules/kubernetes_karpenter/verticalpodautoscalers.tf +++ b/{{cookiecutter.github_repo_name}}/terraform/stacks/modules/kubernetes_karpenter/verticalpodautoscalers.tf @@ -3,6 +3,10 @@ data "template_file" "karpenter" { template = file("${path.module}/yml/vpa-karpenter.yaml") } -resource "kubectl_manifest" "nginx" { +resource "kubectl_manifest" "karpenter" { yaml_body = data.template_file.karpenter.rendered + + depends_on = [ + helm_release.karpenter + ] } diff --git a/{{cookiecutter.github_repo_name}}/terraform/stacks/modules/kubernetes_karpenter/yml/vpa-karpenter.yaml b/{{cookiecutter.github_repo_name}}/terraform/stacks/modules/kubernetes_karpenter/yml/vpa-karpenter.yaml index 515c5fba..d29751f9 100644 --- a/{{cookiecutter.github_repo_name}}/terraform/stacks/modules/kubernetes_karpenter/yml/vpa-karpenter.yaml +++ b/{{cookiecutter.github_repo_name}}/terraform/stacks/modules/kubernetes_karpenter/yml/vpa-karpenter.yaml @@ -2,7 +2,7 @@ apiVersion: autoscaling.k8s.io/v1 kind: VerticalPodAutoscaler metadata: name: vpa-recommender-karpenter - namespace: vpa + namespace: karpenter spec: targetRef: apiVersion: "apps/v1"