forked from argoproj/argocd-example-apps
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit.yaml
More file actions
67 lines (67 loc) · 1.94 KB
/
Copy pathgit.yaml
File metadata and controls
67 lines (67 loc) · 1.94 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
66
67
# Git generator — Directories variant
# Scans the repo at the target revision and generates one Application per matching directory.
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: git-directories
namespace: argocd
spec:
generators:
- git:
repoURL: https://github.com/argoproj/argocd-example-apps
revision: HEAD
directories:
- path: lightweight/app-*
template:
metadata:
name: 'appset-git-dir-{{path.basename}}'
spec:
project: default
source:
repoURL: https://github.com/argoproj/argocd-example-apps
targetRevision: HEAD
path: '{{path}}'
destination:
server: https://kubernetes.default.svc
namespace: 'appset-git-dir-{{path.basename}}'
syncPolicy:
syncOptions:
- CreateNamespace=true
automated:
prune: true
selfHeal: true
---
# Git generator — INTENTIONALLY BROKEN
# Points at a revision that does not exist so the generator fails at fetch time.
# Demonstrates what a generator-level failure looks like: the ApplicationSet CR
# shows an ErrorOccurred condition, no child Applications are generated.
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: git-broken
namespace: argocd
spec:
generators:
- git:
repoURL: https://github.com/argoproj/argocd-example-apps
revision: this-branch-does-not-exist
directories:
- path: '*'
template:
metadata:
name: 'appset-git-broken-{{path.basename}}'
spec:
project: default
source:
repoURL: https://github.com/argoproj/argocd-example-apps
targetRevision: HEAD
path: '{{path}}'
destination:
server: https://kubernetes.default.svc
namespace: 'appset-git-broken-{{path.basename}}'
syncPolicy:
syncOptions:
- CreateNamespace=true
automated:
prune: true
selfHeal: true