Skip to content

Commit

Permalink
feat: add vm
Browse files Browse the repository at this point in the history
  • Loading branch information
incubator4 committed Oct 25, 2023
1 parent 64a1580 commit 51ec4b3
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 0 deletions.
File renamed without changes.
60 changes: 60 additions & 0 deletions application_set.tf
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,63 @@ resource "argocd_application_set" "cert_manager" {
}
}
}

resource "argocd_application_set" "victoria_metrics" {
metadata {
name = "victoriametrics"
}
spec {
generator {
list {
elements = [
{
cluster = argocd_cluster.dev.name
url = argocd_cluster.dev.server
},
{
cluster = argocd_cluster.prod.name
url = argocd_cluster.prod.server
}
]
}
}
template {
metadata {
name = "victoriametrics-{{cluster}}"
labels = {
cluster = "{{cluster}}"
}
}

spec {
source {
helm {
release_name = "victoriametrics"
value_files = [
"$values/victoriametrics/{{cluster}}/values.yaml"
]
}
repo_url = argocd_repository.victoria_metrics.repo
target_revision = "0.x.x"
chart = "victoria-metrics-k8s-stack"
}
source {
repo_url = var.repo_url
target_revision = "HEAD"
ref = "values"
}

source {
repo_url = var.repo_url
target_revision = "HEAD"
path = "victoriametrics/{{cluster}}"
}

destination {
server = "{{url}}"
namespace = "guardian"
}
}
}
}
}
5 changes: 5 additions & 0 deletions repository.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resource "argocd_repository" "victoria_metrics" {
repo = "https://victoriametrics.github.io/helm-charts/"
type = "helm"
name = "vm"
}
5 changes: 5 additions & 0 deletions victoriametrics/dev/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- additional-scrape-configs.yaml
- svc.yaml
4 changes: 4 additions & 0 deletions victoriametrics/prod/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- additional-scrape-configs.yaml

0 comments on commit 51ec4b3

Please sign in to comment.