Skip to content

Commit

Permalink
fix!: remove the ArgoCD namespace variable
Browse files Browse the repository at this point in the history
Since we are hardcoding the namespace variable on all modules, the variable to set the ArgoCD namespace will no longer be needed as well.
  • Loading branch information
lentidas committed Jan 19, 2024
1 parent 0e7d1f7 commit d22e46b
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 15 deletions.
1 change: 0 additions & 1 deletion aks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion eks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion kind/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 2 additions & 5 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion sks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d22e46b

Please sign in to comment.