github.com/argoproj/argo-cd/v3@v3.2.1/applicationset/examples/design-doc/git-files-literal-fasttemplate.yaml (about) 1 # This example demonstrates a git file generator which produces its items based on one or 2 # more files referenced in a git repo. The referenced files would contain a json/yaml list of 3 # arbitrary structured objects. Each item of the list would become a set of parameters to a 4 # generated application. 5 # 6 # Suppose the following git directory structure: 7 # 8 # cluster-deployments 9 # ├── apps 10 # │ └── guestbook 11 # │ ├── v1.0 12 # │ │ └── install.yaml 13 # │ └── v2.0 14 # │ └── install.yaml 15 # └── config 16 # └── clusters.json 17 # 18 # In this example, the `clusters.json` file is json list of structured data: 19 # [ 20 # { 21 # "account": "123456", 22 # "asset_id": "11223344", 23 # "cluster": { 24 # "owner": "Jesse_Suen@intuit.com", 25 # "name": "engineering-dev", 26 # "address": "http://1.2.3.4" 27 # }, 28 # "appVersions": { 29 # "prometheus-operator": "v0.38", 30 # "guestbook": "v2.0" 31 # } 32 # }, 33 # { 34 # "account": "456789", 35 # "asset_id": "55667788", 36 # "cluster": { 37 # "owner": "Alexander_Matyushentsev@intuit.com", 38 # "name": "engineering-prod", 39 # "address": "http://2.4.6.8" 40 # }, 41 # "appVersions": { 42 # "prometheus-operator": "v0.38", 43 # "guestbook": "v1.0" 44 # } 45 # } 46 # ] 47 # 48 apiVersion: argoproj.io/v1alpha1 49 kind: ApplicationSet 50 metadata: 51 name: guestbook 52 spec: 53 generators: 54 - git: 55 repoURL: https://github.com/infra-team/cluster-deployments.git 56 files: 57 - path: config/clusters.json 58 template: 59 metadata: 60 name: '{{cluster.name}}-guestbook' 61 spec: 62 source: 63 repoURL: https://github.com/infra-team/cluster-deployments.git 64 targetRevision: HEAD 65 path: apps/guestbook/{{appVersions.guestbook}} 66 destination: 67 server: http://kubernetes.default.svc 68 namespace: guestbook