github.com/argoproj/argo-cd/v3@v3.2.1/applicationset/examples/design-doc/git-directory-discovery-fasttemplate.yaml (about) 1 # This example demonstrates the git directory generator, which produces an items list 2 # based on discovery of directories in a git repo matching a specified pattern. 3 # Git generators automatically provide {{path}} and {{path.basename}} as available 4 # variables to the app template. 5 # 6 # Suppose the following git directory structure (note the use of different config tools): 7 # 8 # cluster-deployments 9 # └── add-ons 10 # ├── argo-rollouts 11 # │ ├── all.yaml 12 # │ └── kustomization.yaml 13 # ├── argo-workflows 14 # │ └── install.yaml 15 # ├── grafana 16 # │ ├── Chart.yaml 17 # │ └── values.yaml 18 # └── prometheus-operator 19 # ├── Chart.yaml 20 # └── values.yaml 21 # 22 # The following ApplicationSet would produce four applications (in different namespaces), 23 # using the directory basename as both the namespace and application name. 24 apiVersion: argoproj.io/v1alpha1 25 kind: ApplicationSet 26 metadata: 27 name: cluster-addons 28 spec: 29 generators: 30 - git: 31 repoURL: https://github.com/infra-team/cluster-deployments.git 32 directories: 33 - path: add-ons/* 34 template: 35 metadata: 36 name: '{{path.basename}}' 37 spec: 38 source: 39 repoURL: https://github.com/infra-team/cluster-deployments.git 40 targetRevision: HEAD 41 path: '{{path}}' 42 destination: 43 server: http://kubernetes.default.svc 44 namespace: '{{path.basename}}'