# appset-infrastructure.yaml apiVersion: argoproj.io/v1alpha1 kind: ApplicationSet metadata: name: infrastructure-apps # You can place this in the argocd namespace or another namespace you manage namespace: i-argocd-infra spec: # Sync policy for the ApplicationSet resource itself. # This does not affect the generated Applications. syncPolicy: preserveResourcesOnDeletion: true # The list of generators that will produce parameters for the template. generators: - git: repoURL: https://src.ctgev.de/HomeJacob/infrastructure.git revision: HEAD # Or specify a branch like 'main' or 'master' # Directories to scan for applications. # The '/**/' part is a wildcard that matches subdirectories recursively. directories: - path: apps/** - path: helm/** - path: kustomize/** # This is the template for the Argo CD Applications that will be generated. template: metadata: # Generate the application name from the directory's base name. # e.g., a directory at 'helm/prometheus' will create an app named 'prometheus'. name: '{{path.basename}}' # You might want to add labels or annotations here. # labels: # repo: infrastructure spec: # The Argo CD Project this application will belong to. project: default # Source of the application manifests. source: # The repoURL is inherited from the generator. repoURL: '{{repoURL}}' # The revision (branch/tag) is inherited from the generator. targetRevision: '{{revision}}' # The path is the directory found by the generator. path: '{{path}}' # Destination where the manifests will be deployed. destination: server: https://kubernetes.default.svc # Deploys to the same cluster as Argo CD # The namespace can also be dynamic if needed, but 'default' is a safe start. namespace: default # Sync policy for the generated applications. # This will automatically create, prune, and self-heal the resources. syncPolicy: automated: prune: true selfHeal: true syncOptions: - CreateNamespace=true # Creates the destination namespace if it doesn't exist.