From b93b8d2b61d34840065cfaa1d3743889a4125eb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A7alo=20Heleno?= Date: Fri, 12 Jan 2024 09:44: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 | 12 ------------ 6 files changed, 2 insertions(+), 21 deletions(-) diff --git a/aks/main.tf b/aks/main.tf index 763f9557..ac554dae 100644 --- a/aks/main.tf +++ b/aks/main.tf @@ -32,7 +32,6 @@ module "thanos" { 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 0ba5dbd8..1d29690d 100644 --- a/eks/main.tf +++ b/eks/main.tf @@ -3,7 +3,6 @@ module "thanos" { 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 0ba5dbd8..1d29690d 100644 --- a/kind/main.tf +++ b/kind/main.tf @@ -3,7 +3,6 @@ module "thanos" { 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 f71dacd7..42ac8cac 100644 --- a/main.tf +++ b/main.tf @@ -7,10 +7,7 @@ resource "argocd_project" "this" { metadata { name = var.destination_cluster != "in-cluster" ? "thanos-${var.destination_cluster}" : "thanos" - namespace = var.argocd_namespace - annotations = { - "devops-stack.io/argocd_namespace" = var.argocd_namespace - } + namespace = "argocd" } spec { @@ -46,7 +43,7 @@ data "utils_deep_merge_yaml" "values" { resource "argocd_application" "this" { metadata { name = var.destination_cluster != "in-cluster" ? "thanos-${var.destination_cluster}" : "thanos" - namespace = var.argocd_namespace + namespace = "argocd" labels = merge({ "application" = "thanos" "cluster" = var.destination_cluster diff --git a/sks/main.tf b/sks/main.tf index 0ba5dbd8..1d29690d 100644 --- a/sks/main.tf +++ b/sks/main.tf @@ -3,7 +3,6 @@ module "thanos" { 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 6f32cbf6..126288b2 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 @@ -48,12 +42,6 @@ variable "cluster_issuer" { default = "ca-issuer" } -variable "namespace" { - description = "Namespace where the applications's Kubernetes resources should be created. Namespace will be created in case it doesn't exist." - type = string - default = "thanos" -} - variable "helm_values" { description = "Helm chart value overrides. They should be passed as a list of HCL structures." type = any