-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathk8s-demo-app.yaml
66 lines (66 loc) · 1.6 KB
/
k8s-demo-app.yaml
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
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: demo-app
name: demo-app
spec:
replicas: 1
selector:
matchLabels:
app: demo-app
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: demo-app
spec:
volumes:
- emptyDir: {}
name: shared
containers:
- image: hashicorp/vault
imagePullPolicy: IfNotPresent
name: vaultagent
command: ["/usr/bin/tail", "-f", "/dev/null"]
resources: {}
volumeMounts:
- name: shared
mountPath: /config
- image: mariadb
imagePullPolicy: IfNotPresent
name: mysqlapp
resources: {}
command:
- sh
- -c
- |
echo "waiting for script to become available"
while true
do
test -e /config/mariadb-script && /config/mariadb-script
sleep 1
done
volumeMounts:
- name: shared
mountPath: /config
- image: postgres
imagePullPolicy: IfNotPresent
name: postgresapp
resources: {}
command:
- sh
- -c
- |
echo "waiting for script to become available"
while true
do
test -e /config/postgres-script && /config/postgres-script
sleep 1
done
volumeMounts:
- name: shared
mountPath: /config
status: {}