github.com/argoproj/argo-cd/v3@v3.2.1/applicationset/examples/matrix/list-and-git.yaml (about)

     1  # This example demonstrates the combining of the git generator with a list generator
     2  # The expected output would be an application per git directory and a list entry (application_count = git directory * list entries)
     3  #
     4  #
     5  apiVersion: argoproj.io/v1alpha1
     6  kind: ApplicationSet
     7  metadata:
     8    name: list-git
     9  spec:
    10    goTemplate: true
    11    goTemplateOptions: ["missingkey=error"]
    12    generators:
    13    - matrix:
    14        generators:
    15        - git:
    16            repoURL: https://github.com/argoproj/argo-cd.git
    17            revision: HEAD
    18            directories:
    19            - path: applicationset/examples/matrix/cluster-addons/*
    20        - list:
    21            elements:
    22            - cluster: engineering-dev
    23              url: https://1.2.3.4
    24              values:
    25                project: dev
    26            - cluster: engineering-prod
    27              url: https://2.4.6.8
    28              values:
    29                project: prod
    30    template:
    31      metadata:
    32        name: '{{.path.basename}}-{{.cluster}}'
    33      spec:
    34        project: '{{.values.project}}'
    35        source:
    36          repoURL: https://github.com/argoproj/argo-cd.git
    37          targetRevision: HEAD
    38          path: '{{.path.path}}'
    39        destination:
    40          server: '{{.url}}'
    41          namespace: '{{.path.basename}}'