-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp-applicationset.yaml
More file actions
55 lines (55 loc) · 1.85 KB
/
Copy pathapp-applicationset.yaml
File metadata and controls
55 lines (55 loc) · 1.85 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
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: cluster-apps
spec:
generators:
- merge:
mergeKeys:
- metadata.labels.env
- path.basename
generators:
- matrix:
generators:
# enriches applications per directory in manifests/base with cluster labels
- clusters: {}
# produces argocd app per directory in manifests/base
- git:
repoURL: &repo https://github.com/cyclingwithelephants/gitops-example.git
directories:
- path: apps/*
- merge:
mergeKeys:
- path
generators:
# adds env metadata from .env.yaml to each application
# workaround for https://github.com/argoproj/argo-cd/issues/13118 - should use env directory name instead
- git:
repoURL: *repo
revision: HEAD
files:
- path: manifests/groups/*/addons/*/.env.yaml
# discovers environment specific applications overrides
- git:
repoURL: *repo
revision: HEAD
directories:
- path: manifests/groups/*/addons/*
template:
metadata:
name: '{{path.basename}}'
spec:
project: system
source:
repoURL: *repo
path: '{{path}}'
destination:
server: '{{server}}'
namespace: argocd
syncPolicy:
automated:
prune: true
syncOptions:
# this option is needed for prometheus-operator because it has HUGE CRDs
# TODO: find a way to apply this option only to prometheus-operator using this ApplicationSet
- ServerSideApply=true