From d22e46b66c4f7d176b5168b23911c338b78aac98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A7alo=20Heleno?= Date: Fri, 12 Jan 2024 15:57:55 +0100 Subject: [PATCH] fix!: remove the ArgoCD namespace variable Since we are hardcoding the namespace variable on all modules, the variable to set the ArgoCD namespace will no longer be needed as well. --- aks/main.tf | 1 - eks/main.tf | 1 - kind/main.tf | 1 - main.tf | 7 ++----- sks/main.tf | 1 - variables.tf | 6 ------ 6 files changed, 2 insertions(+), 15 deletions(-) diff --git a/aks/main.tf b/aks/main.tf index ad513f04..27bba1c2 100644 --- a/aks/main.tf +++ b/aks/main.tf @@ -32,7 +32,6 @@ module "kube-prometheus-stack" { cluster_name = var.cluster_name base_domain = var.base_domain - argocd_namespace = var.argocd_namespace argocd_project = var.argocd_project argocd_labels = var.argocd_labels destination_cluster = var.destination_cluster diff --git a/eks/main.tf b/eks/main.tf index 29768a52..319c8469 100644 --- a/eks/main.tf +++ b/eks/main.tf @@ -3,7 +3,6 @@ module "kube-prometheus-stack" { cluster_name = var.cluster_name base_domain = var.base_domain - argocd_namespace = var.argocd_namespace argocd_project = var.argocd_project argocd_labels = var.argocd_labels destination_cluster = var.destination_cluster diff --git a/kind/main.tf b/kind/main.tf index 29768a52..319c8469 100644 --- a/kind/main.tf +++ b/kind/main.tf @@ -3,7 +3,6 @@ module "kube-prometheus-stack" { cluster_name = var.cluster_name base_domain = var.base_domain - argocd_namespace = var.argocd_namespace argocd_project = var.argocd_project argocd_labels = var.argocd_labels destination_cluster = var.destination_cluster diff --git a/main.tf b/main.tf index 2a871e3e..eac834dc 100644 --- a/main.tf +++ b/main.tf @@ -7,10 +7,7 @@ resource "argocd_project" "this" { metadata { name = var.destination_cluster != "in-cluster" ? "kube-prometheus-stack-${var.destination_cluster}" : "kube-prometheus-stack" - namespace = var.argocd_namespace - annotations = { - "devops-stack.io/argocd_namespace" = var.argocd_namespace - } + namespace = "argocd" } spec { @@ -83,7 +80,7 @@ data "utils_deep_merge_yaml" "values" { resource "argocd_application" "this" { metadata { name = var.destination_cluster != "in-cluster" ? "kube-prometheus-stack-${var.destination_cluster}" : "kube-prometheus-stack" - namespace = var.argocd_namespace + namespace = "argocd" labels = merge({ "application" = "kube-prometheus-stack" "cluster" = var.destination_cluster diff --git a/sks/main.tf b/sks/main.tf index 29768a52..319c8469 100644 --- a/sks/main.tf +++ b/sks/main.tf @@ -3,7 +3,6 @@ module "kube-prometheus-stack" { cluster_name = var.cluster_name base_domain = var.base_domain - argocd_namespace = var.argocd_namespace argocd_project = var.argocd_project argocd_labels = var.argocd_labels destination_cluster = var.destination_cluster diff --git a/variables.tf b/variables.tf index e8593ac8..2e80be83 100644 --- a/variables.tf +++ b/variables.tf @@ -12,12 +12,6 @@ variable "base_domain" { type = string } -variable "argocd_namespace" { - description = "Namespace used by Argo CD where the Application and AppProject resources should be created." - type = string - default = "argocd" -} - variable "argocd_project" { description = "Name of the Argo CD AppProject where the Application should be created. If not set, the Application will be created in a new AppProject only for this Application." type = string