github.com/argoproj/argo-cd/v3@v3.2.1/applicationset/examples/template-override/template-overrides-example-fasttemplate.yaml (about)

     1  # App templates can also be defined as part of the generator's template stanza. Sometimes it is
     2  # useful to do this in order to override the spec.template stanza, and when simple string
     3  # parameterization are insufficient. In the below examples, the generators[].XXX.template is 
     4  # a partial definition, which overrides/patch the default template.
     5  apiVersion: argoproj.io/v1alpha1
     6  kind: ApplicationSet
     7  metadata:
     8    name: guestbook
     9  spec:
    10    generators:
    11    - list:
    12        elements:
    13          - cluster: engineering-dev
    14            url: https://kubernetes.default.svc
    15        template:
    16          metadata: {}
    17          spec:
    18            project: "default"
    19            source:
    20              targetRevision: HEAD
    21              repoURL: https://github.com/argoproj/argo-cd.git
    22              path: 'applicationset/examples/template-override/{{cluster}}-override'
    23            destination: {}
    24  
    25    template:
    26      metadata:
    27        name: '{{cluster}}-guestbook'
    28      spec:
    29        project: "default"
    30        source:
    31          repoURL: https://github.com/argoproj/argo-cd.git
    32          targetRevision: HEAD
    33          path: applicationset/examples/template-override/default
    34        destination:
    35          server: '{{url}}'
    36          namespace: guestbook