Skip to content

Commit ed602a2

Browse files
app of apps example
1 parent 7bc0708 commit ed602a2

File tree

10 files changed

+290
-0
lines changed

10 files changed

+290
-0
lines changed

app-of-apps/manifests/deployment.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
apiVersion: apps/v1
3+
kind: Deployment
4+
metadata:
5+
name: simple-deployment
6+
spec:
7+
replicas: 1
8+
selector:
9+
matchLabels:
10+
app: trivial-go-web-app
11+
template:
12+
metadata:
13+
labels:
14+
app: trivial-go-web-app
15+
spec:
16+
containers:
17+
- name: webserver-simple
18+
image: docker.io/kostiscodefresh/gitops-simple-app:v1.0
19+
ports:
20+
- containerPort: 8080

app-of-apps/manifests/service.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: simple-service
5+
spec:
6+
type: ClusterIP
7+
selector:
8+
app: trivial-go-web-app
9+
ports:
10+
- protocol: TCP
11+
port: 80
12+
targetPort: 8080
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: argo-rollouts
5+
# You'll usually want to add your resources to the argocd namespace.
6+
namespace: argocd
7+
# Add a this finalizer ONLY if you want these to cascade delete.
8+
finalizers:
9+
- resources-finalizer.argocd.argoproj.io
10+
spec:
11+
# The project the application belongs to.
12+
project: default
13+
14+
# Source of the application manifests
15+
source:
16+
repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git
17+
targetRevision: HEAD
18+
path: ./app-of-apps/manifests
19+
20+
# Destination cluster and namespace to deploy the application
21+
destination:
22+
server: https://kubernetes.default.svc
23+
namespace: argo-rollouts
24+
25+
# Sync policy
26+
syncPolicy:
27+
syncOptions:
28+
- CreateNamespace=true
29+
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.
30+
prune: true # Specifies if resources should be pruned during auto-syncing ( false by default ).
31+
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 ).
32+
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: cert-manager
5+
# You'll usually want to add your resources to the argocd namespace.
6+
namespace: argocd
7+
# Add a this finalizer ONLY if you want these to cascade delete.
8+
finalizers:
9+
- resources-finalizer.argocd.argoproj.io
10+
spec:
11+
# The project the application belongs to.
12+
project: default
13+
14+
# Source of the application manifests
15+
source:
16+
repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git
17+
targetRevision: HEAD
18+
path: ./app-of-apps/manifests
19+
20+
# Destination cluster and namespace to deploy the application
21+
destination:
22+
server: https://kubernetes.default.svc
23+
namespace: cert-manager
24+
25+
# Sync policy
26+
syncPolicy:
27+
syncOptions:
28+
- CreateNamespace=true
29+
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.
30+
prune: true # Specifies if resources should be pruned during auto-syncing ( false by default ).
31+
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 ).
32+

app-of-apps/my-app-list/grafana.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: grafana
5+
# You'll usually want to add your resources to the argocd namespace.
6+
namespace: argocd
7+
# Add a this finalizer ONLY if you want these to cascade delete.
8+
finalizers:
9+
- resources-finalizer.argocd.argoproj.io
10+
spec:
11+
# The project the application belongs to.
12+
project: default
13+
14+
# Source of the application manifests
15+
source:
16+
repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git
17+
targetRevision: HEAD
18+
path: ./app-of-apps/manifests
19+
20+
# Destination cluster and namespace to deploy the application
21+
destination:
22+
server: https://kubernetes.default.svc
23+
namespace: grafana
24+
25+
# Sync policy
26+
syncPolicy:
27+
syncOptions:
28+
- CreateNamespace=true
29+
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.
30+
prune: true # Specifies if resources should be pruned during auto-syncing ( false by default ).
31+
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 ).
32+

app-of-apps/my-app-list/linkerd.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: linkerd
5+
# You'll usually want to add your resources to the argocd namespace.
6+
namespace: argocd
7+
# Add a this finalizer ONLY if you want these to cascade delete.
8+
finalizers:
9+
- resources-finalizer.argocd.argoproj.io
10+
spec:
11+
# The project the application belongs to.
12+
project: default
13+
14+
# Source of the application manifests
15+
source:
16+
repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git
17+
targetRevision: HEAD
18+
path: ./app-of-apps/manifests
19+
20+
# Destination cluster and namespace to deploy the application
21+
destination:
22+
server: https://kubernetes.default.svc
23+
namespace: linkerd
24+
25+
# Sync policy
26+
syncPolicy:
27+
syncOptions:
28+
- CreateNamespace=true
29+
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.
30+
prune: true # Specifies if resources should be pruned during auto-syncing ( false by default ).
31+
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 ).
32+

app-of-apps/my-app-list/nginx.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: nginx
5+
# You'll usually want to add your resources to the argocd namespace.
6+
namespace: argocd
7+
# Add a this finalizer ONLY if you want these to cascade delete.
8+
finalizers:
9+
- resources-finalizer.argocd.argoproj.io
10+
spec:
11+
# The project the application belongs to.
12+
project: default
13+
14+
# Source of the application manifests
15+
source:
16+
repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git
17+
targetRevision: HEAD
18+
path: ./app-of-apps/manifests
19+
20+
# Destination cluster and namespace to deploy the application
21+
destination:
22+
server: https://kubernetes.default.svc
23+
namespace: nginx
24+
25+
# Sync policy
26+
syncPolicy:
27+
syncOptions:
28+
- CreateNamespace=true
29+
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.
30+
prune: true # Specifies if resources should be pruned during auto-syncing ( false by default ).
31+
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 ).
32+
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: prometheus
5+
# You'll usually want to add your resources to the argocd namespace.
6+
namespace: argocd
7+
# Add a this finalizer ONLY if you want these to cascade delete.
8+
finalizers:
9+
- resources-finalizer.argocd.argoproj.io
10+
spec:
11+
# The project the application belongs to.
12+
project: default
13+
14+
# Source of the application manifests
15+
source:
16+
repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git
17+
targetRevision: HEAD
18+
path: ./app-of-apps/manifests
19+
20+
# Destination cluster and namespace to deploy the application
21+
destination:
22+
server: https://kubernetes.default.svc
23+
namespace: prometheus
24+
25+
# Sync policy
26+
syncPolicy:
27+
syncOptions:
28+
- CreateNamespace=true
29+
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.
30+
prune: true # Specifies if resources should be pruned during auto-syncing ( false by default ).
31+
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 ).
32+
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: demo-app3
5+
# You'll usually want to add your resources to the argocd namespace.
6+
namespace: sealed-secrets
7+
# Add a this finalizer ONLY if you want these to cascade delete.
8+
finalizers:
9+
- resources-finalizer.argocd.argoproj.io
10+
spec:
11+
# The project the application belongs to.
12+
project: default
13+
14+
# Source of the application manifests
15+
source:
16+
repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git
17+
targetRevision: HEAD
18+
path: ./app-of-apps/manifests
19+
20+
# Destination cluster and namespace to deploy the application
21+
destination:
22+
server: https://kubernetes.default.svc
23+
namespace: sealed-secrets
24+
25+
# Sync policy
26+
syncPolicy:
27+
syncOptions:
28+
- CreateNamespace=true
29+
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.
30+
prune: true # Specifies if resources should be pruned during auto-syncing ( false by default ).
31+
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 ).
32+
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: root-application
5+
# You'll usually want to add your resources to the argocd namespace.
6+
namespace: argocd
7+
# Add a this finalizer ONLY if you want these to cascade delete.
8+
finalizers:
9+
- resources-finalizer.argocd.argoproj.io
10+
spec:
11+
# The project the application belongs to.
12+
project: default
13+
14+
# Source of the application manifests
15+
source:
16+
repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git
17+
targetRevision: HEAD
18+
path: ./app-of-apps/my-app-list
19+
20+
# directory
21+
directory:
22+
recurse: false
23+
# Destination cluster and namespace to deploy the application
24+
destination:
25+
server: https://kubernetes.default.svc
26+
namespace: default
27+
28+
# Sync policy
29+
syncPolicy:
30+
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.
31+
prune: true # Specifies if resources should be pruned during auto-syncing ( false by default ).
32+
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 ).
33+
allowEmpty: false # Allows deleting all application resources during automatic syncing ( false by default ).
34+

0 commit comments

Comments
 (0)