github.com/argoproj/argo-cd/v3@v3.2.1/applicationset/examples/pull-request-generator/pull-request-example.yaml (about) 1 apiVersion: argoproj.io/v1alpha1 2 kind: ApplicationSet 3 metadata: 4 name: myapp 5 spec: 6 goTemplate: true 7 goTemplateOptions: ["missingkey=error"] 8 generators: 9 - pullRequest: 10 github: 11 # The GitHub organization or user. 12 owner: myorg 13 # The Github repository 14 repo: myrepo 15 # For GitHub Enterprise. (optional) 16 api: https://git.example.com/ 17 # Reference to a Secret containing an access token. (optional) 18 tokenRef: 19 secretName: github-token 20 key: token 21 # Labels is used to filter the PRs that you want to target. (optional) 22 labels: 23 - preview 24 template: 25 metadata: 26 name: 'myapp-{{ .branch }}-{{ .number }}' 27 labels: 28 key1: '{{ index .labels 0 }}' 29 spec: 30 source: 31 repoURL: 'https://github.com/myorg/myrepo.git' 32 targetRevision: '{{ .head_sha }}' 33 path: helm-guestbook 34 helm: 35 parameters: 36 - name: "image.tag" 37 value: "pull-{{ .head_sha }}" 38 project: default 39 destination: 40 server: https://kubernetes.default.svc 41 namespace: "{{ .branch }}-{{ .number }}" 42 syncPolicy: 43 syncOptions: 44 - CreateNamespace=true