Skip to content

Commit

Permalink
argocd git generator test
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzocorallo committed Mar 1, 2025
1 parent 180c8f2 commit 649032e
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions argocd/apps.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,67 @@ resource "helm_release" "argo_cd" {
tenant = var.tenant
})
]

set {
name = "applicationSet.enabled"
value = "true"
}
}

resource "kubernetes_manifest" "git_generator_applicationset" {
manifest = {
apiVersion = "argoproj.io/v1alpha1"
kind = "ApplicationSet"
metadata = {
name = "git-generator-app-set"
namespace = var.namespace
}
spec = {
generators = [
{
git = {
repoURL = "https://github.com/PoliNetworkOrg/polinetwork-cd.git"
revision = "generator"
directories = [
{
path = "*"
}
]
}
}
]
template = {
metadata = {
name = "{{path.basename}}"
}
spec = {
project = "default"
source = {
repoURL = "https://github.com/PoliNetworkOrg/polinetwork-cd.git"
targetRevision = "generator"
path = "{{path}}"
}
destination = {
server = "https://kubernetes.default.svc"
namespace = "{{path.basename}}"
}
syncPolicy = {
automated = {
prune = true
selfHeal = true
}
syncOptions = [
"CreateNamespace=true"
]
}
}
}
}
}

depends_on = [
helm_release.argo_cd
]
}

resource "helm_release" "argocd_apps" {
Expand Down

0 comments on commit 649032e

Please sign in to comment.