mirror of
https://github.com/hanzoai/deploy.git
synced 2026-10-07 08:44:50 +00:00
* ApplicationSet Go Template Signed-off-by: Geoffrey Muselli <[email protected]> * go template improvements Signed-off-by: CI <[email protected]> * update go mod Signed-off-by: CI <[email protected]> * fix tests Signed-off-by: CI <[email protected]> * fix tests Signed-off-by: CI <[email protected]> * fix tests Signed-off-by: CI <[email protected]> * Add tests for error handling Signed-off-by: Geoffrey Muselli <[email protected]> Co-authored-by: CI <[email protected]>
49 lines
1.4 KiB
YAML
49 lines
1.4 KiB
YAML
# App templates can also be defined as part of the generator's template stanza. Sometimes it is
|
|
# useful to do this in order to override the spec.template stanza, and when simple string
|
|
# parameterization are insufficient. In the below examples, the generators[].XXX.template is
|
|
# a partial definition, which overrides/patch the default template.
|
|
apiVersion: argoproj.io/v1alpha1
|
|
kind: ApplicationSet
|
|
metadata:
|
|
name: guestbook
|
|
spec:
|
|
generators:
|
|
- list:
|
|
elements:
|
|
- cluster: engineering-dev
|
|
url: https://1.2.3.4
|
|
template:
|
|
metadata: {}
|
|
spec:
|
|
project: "project"
|
|
source:
|
|
repoURL: https://github.com/infra-team/cluster-deployments.git
|
|
path: '{{cluster}}-override'
|
|
destination: {}
|
|
|
|
- list:
|
|
elements:
|
|
- cluster: engineering-prod
|
|
url: https://1.2.3.4
|
|
template:
|
|
metadata: {}
|
|
spec:
|
|
project: "project2"
|
|
source:
|
|
repoURL: https://github.com/infra-team/cluster-deployments.git
|
|
path: '{{cluster}}-override2'
|
|
destination: {}
|
|
|
|
template:
|
|
metadata:
|
|
name: '{{cluster}}-guestbook'
|
|
spec:
|
|
project: "project"
|
|
source:
|
|
repoURL: https://github.com/infra-team/cluster-deployments.git
|
|
targetRevision: HEAD
|
|
path: guestbook/{{cluster}}
|
|
destination:
|
|
server: '{{url}}'
|
|
namespace: guestbook
|