github.com/argoproj/argo-cd/v3@v3.2.1/applicationset/examples/matrix/list-and-git-fasttemplate.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    generators:
    11    - matrix:
    12        generators:
    13        - git:
    14            repoURL: https://github.com/argoproj/argo-cd.git
    15            revision: HEAD
    16            directories:
    17            - path: applicationset/examples/matrix/cluster-addons/*
    18        - list:
    19            elements:
    20            - cluster: engineering-dev
    21              url: https://1.2.3.4
    22              values:
    23                project: dev
    24            - cluster: engineering-prod
    25              url: https://2.4.6.8
    26              values:
    27                project: prod
    28    template:
    29      metadata:
    30        name: '{{path.basename}}-{{cluster}}'
    31      spec:
    32        project: '{{values.project}}'
    33        source:
    34          repoURL: https://github.com/argoproj/argo-cd.git
    35          targetRevision: HEAD
    36          path: '{{path}}'
    37        destination:
    38          server: '{{url}}'
    39          namespace: '{{path.basename}}'