From ed1822de535bf7856949a75a6d906c5941de7a31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A7alo=20Heleno?= Date: Fri, 12 Jan 2024 15:49:22 +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. --- main.tf | 7 ++----- variables.tf | 6 ------ 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/main.tf b/main.tf index ba07b4c..4e1b84c 100644 --- a/main.tf +++ b/main.tf @@ -7,10 +7,7 @@ resource "argocd_project" "this" { metadata { name = var.destination_cluster != "in-cluster" ? "longhorn-${var.destination_cluster}" : "longhorn" - namespace = var.argocd_namespace - annotations = { - "devops-stack.io/argocd_namespace" = var.argocd_namespace - } + namespace = "argocd" } spec { @@ -40,7 +37,7 @@ data "utils_deep_merge_yaml" "values" { resource "argocd_application" "this" { metadata { name = var.destination_cluster != "in-cluster" ? "longhorn-${var.destination_cluster}" : "longhorn" - namespace = var.argocd_namespace + namespace = "argocd" labels = merge({ "application" = "longhorn" "cluster" = var.destination_cluster diff --git a/variables.tf b/variables.tf index 7aec653..2e68bb6 100644 --- a/variables.tf +++ b/variables.tf @@ -20,12 +20,6 @@ variable "cluster_issuer" { default = "selfsigned-issuer" } -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