Skip to content

Commit d970056

Browse files
Started solutions
1 parent af36d27 commit d970056

File tree

6 files changed

+76
-2
lines changed

6 files changed

+76
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: batch/v1
2+
kind: Job
3+
metadata:
4+
namespace: example03
5+
generateName: cleanup-after-sync-
6+
annotations:
7+
argocd.argoproj.io/hook: PostSync
8+
spec:
9+
template:
10+
spec:
11+
containers:
12+
- name: dummy-run
13+
image: alpine
14+
command:
15+
- "sleep"
16+
- "10"
17+
restartPolicy: Never
18+
backoffLimit: 2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: batch/v1
2+
kind: Job
3+
metadata:
4+
namespace: example03
5+
generateName: my-db-upgrade-
6+
annotations:
7+
argocd.argoproj.io/hook: PreSync
8+
spec:
9+
template:
10+
spec:
11+
containers:
12+
- name: dummy-run
13+
image: alpine
14+
command:
15+
- "sleep"
16+
- "10"
17+
restartPolicy: Never
18+
backoffLimit: 2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
apiVersion: apps/v1
3+
kind: Deployment
4+
metadata:
5+
name: simple-deployment
6+
namespace: example03
7+
spec:
8+
replicas: 1
9+
selector:
10+
matchLabels:
11+
app: trivial-go-web-app
12+
template:
13+
metadata:
14+
labels:
15+
app: trivial-go-web-app
16+
spec:
17+
containers:
18+
- name: webserver-simple
19+
image: docker.io/kostiscodefresh/gitops-simple-app:v1.0
20+
ports:
21+
- containerPort: 8080
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
apiVersion: v1
2+
kind: Namespace
3+
metadata:
4+
name: example03
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: simple-service
5+
namespace: example03
6+
spec:
7+
type: ClusterIP
8+
selector:
9+
app: trivial-go-web-app
10+
ports:
11+
- protocol: TCP
12+
port: 80
13+
targetPort: 8080

sync-hooks-waves/03-postsync-cleanup/cleanup.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ metadata:
55
generateName: cleanup-after-sync-
66
labels:
77
codefresh.io/cert: cleanup-job
8-
annotations:
9-
argocd.argoproj.io/hook: PostSync
8+
#annotations:
9+
#argocd.argoproj.io/hook: PostSync
1010
spec:
1111
template:
1212
spec:

0 commit comments

Comments
 (0)