diff --git a/kubernetes/argocd.nix b/kubernetes/argocd.nix index ccc1a2f..b0fe0a2 100644 --- a/kubernetes/argocd.nix +++ b/kubernetes/argocd.nix @@ -35,5 +35,38 @@ }; }; }; + + resources."argoproj.io/v1alpha1".ApplicationSet.poketwo.spec = { + generators = [{ + git = { + repoURL = "https://github.com/poketwo/nix.git"; + revision = "cluster"; + directories = [{ path = "*"; }]; + }; + }]; + + template = { + metadata = { + name = "{{.path.basename}}"; + namespace = "argocd"; + }; + spec = { + project = "default"; + source = { + repoURL = "https://github.com/poketwo/nix.git"; + targetRevision = "cluster"; + path = "{{.path.path}}"; + }; + destination = { + server = "https://kubernetes.default.svc"; + namespace = "{{.path.basename}}"; + }; + syncPolicy = { + automated = { }; + syncOptions = [ "CreateNamespace=true" ]; + }; + }; + }; + }; }; }