Skip to content

Commit ca0a883

Browse files
Example application set for migration of apps
1 parent b7978a5 commit ca0a883

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: ApplicationSet
3+
metadata:
4+
name: my-qa-appset
5+
namespace: argocd
6+
spec:
7+
goTemplate: true
8+
goTemplateOptions: ["missingkey=error"]
9+
generators:
10+
- git:
11+
repoURL: https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git
12+
revision: HEAD
13+
directories:
14+
- path: argocd-apps-structure/apps/*/envs/qa
15+
template:
16+
metadata:
17+
name: '{{index .path.segments 2}}-{{index .path.segments 4}}'
18+
spec:
19+
# The project the application belongs to.
20+
project: default
21+
22+
# Source of the application manifests
23+
source:
24+
repoURL: https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git
25+
targetRevision: HEAD
26+
path: '{{.path.path}}'
27+
28+
# Destination cluster and namespace to deploy the application
29+
destination:
30+
server: https://kubernetes.default.svc
31+
namespace: '{{index .path.segments 2}}-{{index .path.segments 4}}'
32+
33+
# Sync policy
34+
syncPolicy:
35+
# preserveResourcesOnDeletion: false
36+
syncOptions:
37+
- CreateNamespace=true
38+
automated: # automated sync by default retries failed attempts 5 times with following delays between attempts ( 5s, 10s, 20s, 40s, 80s ); retry controlled using `retry` field.
39+
selfHeal: true # Specifies if partial app sync should be executed when resources are changed only in target Kubernetes cluster and no git change detected ( false by default ).
40+

0 commit comments

Comments
 (0)