-
Notifications
You must be signed in to change notification settings - Fork 902
/
Copy pathmetadata-db-deployment.yaml
52 lines (51 loc) · 1.14 KB
/
metadata-db-deployment.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: metadata-db
labels:
component: db
spec:
selector:
matchLabels:
component: db
replicas: 1
strategy:
type: Recreate
template:
metadata:
name: db
labels:
component: db
annotations:
sidecar.istio.io/inject: "false"
spec:
containers:
- name: db-container
image: mysql:8.0.3
args:
- --datadir
- /var/lib/mysql/datadir
envFrom:
- configMapRef:
name: metadata-db-parameters
- secretRef:
name: metadata-db-secrets
ports:
- name: dbapi
containerPort: 3306
readinessProbe:
exec:
command:
- "/bin/bash"
- "-c"
- "mysql -D $$MYSQL_DATABASE -p$$MYSQL_ROOT_PASSWORD -e 'SELECT 1'"
initialDelaySeconds: 5
periodSeconds: 2
timeoutSeconds: 1
volumeMounts:
- name: metadata-mysql
mountPath: /var/lib/mysql
volumes:
- name: metadata-mysql
persistentVolumeClaim:
claimName: metadata-mysql