apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: external-secrets-appset
  namespace: argocd
spec:
  generators:
    - git:
        repoURL: https://git.dvirlabs.com/dvirlabs/observability-stack.git
        revision: master
        directories:
          - path: manifests/external-secrets
  template:
    metadata:
      name: 'external-secret-{{path.basename}}'
    spec:
      project: observability
      source:
        repoURL: https://git.dvirlabs.com/dvirlabs/observability-stack.git
        targetRevision: master
        path: '{{path}}'
        directory:
          recurse: true
      destination:
        server: https://kubernetes.default.svc
        namespace: monitoring
      syncPolicy:
        automated:
          prune: true
          selfHeal: true