-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathappset.yaml
More file actions
65 lines (65 loc) · 1.78 KB
/
appset.yaml
File metadata and controls
65 lines (65 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: example
namespace: argocd
spec:
generators:
- git:
files:
- path: dev/*/deploy.yaml
repoURL: https://github.com/unbyte-de/argocd-example-deployments.git
revision: HEAD
values:
appRepoPathURL: https://github.com/unbyte-de/argocd-example-deployments/-/tree/main/{{.path.path}}
appValuesRepoURL: https://github.com/unbyte-de/argocd-example-deployments.git
goTemplate: true
syncPolicy:
applicationsSync: sync
template:
metadata:
name: '{{.releaseName}}'
spec:
destination:
namespace: '{{.namespace}}'
server: https://kubernetes.default.svc
info:
- name: 'Git URL:'
value: '{{.values.appRepoPathURL}}'
project: 'default'
syncPolicy:
automated:
prune: true
selfHeal: true
retry:
backoff:
duration: 5s
factor: 2
maxDuration: 3m
limit: 5
syncOptions:
- Validate=true
- CreateNamespace=true
- PrunePropagationPolicy=foreground
- PruneLast=true
templatePatch: |
spec:
sources:
{{ if hasPrefix "oci://" .repo }}
- repoURL: '{{ trimSuffix (printf "/%s" .chart) (trimPrefix "oci://" .repo) }}'
{{ else }}
- repoURL: '{{ .repo }}'
{{ end }}
targetRevision: '{{.version}}'
chart: '{{.chart}}'
helm:
releaseName: '{{.releaseName}}'
{{- if .configFiles }}
valueFiles:
{{- range $cf := .configFiles }}
- $configvalues/{{$.path.path}}/{{ $cf }}
{{- end }}
{{- end }}
- repoURL: '{{.values.appValuesRepoURL}}'
targetRevision: HEAD
ref: configvalues