Rename to simple-example and add pre-post-hook example
This commit is contained in:
parent
6c8e6ca4f6
commit
349d95b6d0
20
example-app/deployment.yaml
Normal file
20
example-app/deployment.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: simple-example
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
revisionHistoryLimit: 3
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: simple-example
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: simple-example
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: quay.io/acend/example-web-go
|
||||||
|
name: simple-example
|
||||||
|
ports:
|
||||||
|
- containerPort: 5000
|
@ -1,20 +0,0 @@
|
|||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: example-php-docker-helloworld
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
revisionHistoryLimit: 3
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: example-php-docker-helloworld
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: example-php-docker-helloworld
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- image: appuio/example-php-docker-helloworld
|
|
||||||
name: example-php-docker-helloworld
|
|
||||||
ports:
|
|
||||||
- containerPort: 8080
|
|
@ -1,10 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: example-php-docker-helloworld
|
|
||||||
spec:
|
|
||||||
ports:
|
|
||||||
- port: 8080
|
|
||||||
targetPort: 8080
|
|
||||||
selector:
|
|
||||||
app: example-php-docker-helloworld
|
|
10
example-app/svc.yaml
Normal file
10
example-app/svc.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: simple-example
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 5000
|
||||||
|
targetPort: 5000
|
||||||
|
selector:
|
||||||
|
app: simple-example
|
20
pre-post-sync-hook/deployment.yaml
Normal file
20
pre-post-sync-hook/deployment.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: pre-post-sync-hook
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
revisionHistoryLimit: 3
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: pre-post-sync-hook
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: pre-post-sync-hook
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: quay.io/acend/example-web-go
|
||||||
|
name: example-web-go
|
||||||
|
ports:
|
||||||
|
- containerPort: 5000
|
16
pre-post-sync-hook/post-sync-job.yaml
Normal file
16
pre-post-sync-hook/post-sync-job.yaml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: after
|
||||||
|
annotations:
|
||||||
|
argocd.argoproj.io/hook: PostSync
|
||||||
|
argocd.argoproj.io/hook-delete-policy: HookSucceeded
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: sleep
|
||||||
|
image: quay.io/acend/example-web-go
|
||||||
|
command: ["sleep", "10"]
|
||||||
|
restartPolicy: Never
|
||||||
|
backoffLimit: 0
|
16
pre-post-sync-hook/pre-sync-job.yaml
Normal file
16
pre-post-sync-hook/pre-sync-job.yaml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: before
|
||||||
|
annotations:
|
||||||
|
argocd.argoproj.io/hook: PreSync
|
||||||
|
argocd.argoproj.io/hook-delete-policy: HookSucceeded
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: sleep
|
||||||
|
image: quay.io/acend/example-web-go
|
||||||
|
command: ["sleep", "10"]
|
||||||
|
restartPolicy: Never
|
||||||
|
backoffLimit: 0
|
10
pre-post-sync-hook/svc.yaml
Normal file
10
pre-post-sync-hook/svc.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: pre-post-sync-hook
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 5000
|
||||||
|
targetPort: 5000
|
||||||
|
selector:
|
||||||
|
app: pre-post-sync-hook
|
Loading…
x
Reference in New Issue
Block a user