apiVersion: argoproj.io/v1alpha1 kind: ApplicationSet metadata: name: envs-appset namespace: argocd spec: generators: - git: repoURL: https://git.dvirlabs.com/dvirlabs/app-definition.git revision: HEAD files: - path: env-sets/*/metadata.yaml template: metadata: name: env-{{env}} spec: project: '{{project}}' source: repoURL: https://git.dvirlabs.com/dvirlabs/app-definition.git targetRevision: HEAD path: env-sets/{{env}} directory: recurse: true # ✅ This ensures it picks up applicationSet.yaml in that folder destination: server: https://kubernetes.default.svc namespace: '{{namespace}}' syncPolicy: automated: prune: true selfHeal: true