-
Notifications
You must be signed in to change notification settings - Fork 0
/
vpro-db-deploy.yml
47 lines (47 loc) · 1.18 KB
/
vpro-db-deploy.yml
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
apiVersion: apps/v1
kind: Deployment
metadata:
name: vprodb
labels:
app: vprodb
spec:
selector:
matchLabels:
app: vprodb
replicas: 1
template:
metadata:
labels:
app: vprodb
spec:
initContainers:
- image: busybox
name: mysql-volume-cleaner
args: [/bin/sh, -c, 'rm -rf /var/lib/mysql/lost+found || true']
volumeMounts:
- mountPath: /var/lib/mysql
name: mysql-volume
containers:
- name: vprodb
#image: vprofile/vprofiledb:V1
image: stojc69/my-vprodb:latest
#args:
#- "--ignore-db-dir=lost+found"
volumeMounts:
- mountPath: /var/lib/mysql
name: mysql-volume
ports:
- name: vprodb-port
containerPort: 3306
env:
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: app-secret #iz app-secret
key: db-pass
volumes:
- name: mysql-volume
# directory location on hoast
hostPath:
path: /vproapp-db-data
type: DirectoryOrCreate