Skip to content

Commit 4530db8

Browse files
committed
feat(argocd): add new argocd_application_set for loki and remove existing promtail configurations
1 parent c793662 commit 4530db8

File tree

11 files changed

+48
-421
lines changed

11 files changed

+48
-421
lines changed

application.tf

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -87,36 +87,6 @@ resource "argocd_application" "grafana" {
8787
}
8888
}
8989

90-
# resource "argocd_application" "loki" {
91-
# metadata {
92-
# name = "loki"
93-
# }
94-
# spec {
95-
# project = argocd_project.guardian.metadata[0].name
96-
# source {
97-
# repo_url = var.repo_url
98-
# target_revision = "HEAD"
99-
# path = "loki/ops"
100-
# plugin {
101-
# name = "avp-kustomize"
102-
# env {
103-
# name = "APP_REPO"
104-
# value = "NaturalSelectionLabs/Hephaestus"
105-
# }
106-
# env {
107-
# name = "AVP_SECRET"
108-
# value = "guardian:avp-prod"
109-
# }
110-
# }
111-
# }
112-
113-
# destination {
114-
# name = "ops"
115-
# namespace = "guardian"
116-
# }
117-
# }
118-
# }
119-
12090
resource "argocd_application" "keycloak" {
12191
metadata {
12292
name = "keycloak"

application_set.tf

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -577,56 +577,56 @@ resource "argocd_application_set" "rabbitmq" {
577577
# }
578578
# }
579579

580-
# resource "argocd_application_set" "promtail" {
581-
# metadata {
582-
# name = "promtail"
583-
# }
584-
# spec {
585-
# go_template = true
586-
# generator {
587-
# clusters {
588-
# selector {
589-
# match_labels = {
590-
# "argocd.argoproj.io/secret-type" = "cluster"
591-
# }
592-
# match_expressions {
593-
# key = "provider"
594-
# operator = "NotIn"
595-
# values = ["alicloud"]
596-
# }
597-
# }
598-
# }
599-
# }
600-
# template {
601-
# metadata {
602-
# name = "promtail-{{.name}}"
603-
# labels = {
604-
# cluster = "{{.name}}"
605-
# env = "{{.metadata.labels.env}}"
606-
# }
607-
# }
608-
# spec {
609-
# project = argocd_project.guardian.metadata[0].name
610-
# source {
611-
# repo_url = var.repo_url
612-
# target_revision = "HEAD"
613-
# path = "promtail/{{.name}}"
614-
# kustomize {
615-
# common_annotations = {
616-
# "github.com/url" = var.repo_url
617-
# }
618-
# }
619-
# }
580+
resource "argocd_application_set" "loki" {
581+
metadata {
582+
name = "loki"
583+
}
584+
spec {
585+
go_template = true
586+
generator {
587+
clusters {
588+
selector {
589+
match_labels = {
590+
"argocd.argoproj.io/secret-type" = "cluster"
591+
}
592+
match_expressions {
593+
key = "provider"
594+
operator = "NotIn"
595+
values = ["gcp"]
596+
}
597+
}
598+
}
599+
}
600+
template {
601+
metadata {
602+
name = "loki-{{.name}}"
603+
labels = {
604+
cluster = "{{.name}}"
605+
env = "{{.metadata.labels.env}}"
606+
}
607+
}
608+
spec {
609+
project = argocd_project.guardian.metadata[0].name
610+
source {
611+
repo_url = var.repo_url
612+
target_revision = "HEAD"
613+
path = "loki/{{.metadata.labels.provider}}"
614+
kustomize {
615+
common_annotations = {
616+
"github.com/url" = var.repo_url
617+
}
618+
}
619+
}
620620

621-
# destination {
622-
# name = "{{.name}}"
623-
# namespace = "guardian"
624-
# }
625-
# }
626-
# }
621+
destination {
622+
name = "{{.name}}"
623+
namespace = "guardian"
624+
}
625+
}
626+
}
627627

628-
# }
629-
# }
628+
}
629+
}
630630

631631
resource "argocd_application_set" "keda" {
632632
metadata {

loki/ops/kustomization.yaml

Lines changed: 0 additions & 13 deletions
This file was deleted.

loki/ops/values.yaml

Lines changed: 0 additions & 197 deletions
This file was deleted.

promtail/dev/kustomization.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.

promtail/follow/kustomization.yaml

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)