-
Notifications
You must be signed in to change notification settings - Fork 455
/
Copy pathmysql.yaml
74 lines (74 loc) · 1.99 KB
/
mysql.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
67
68
69
70
71
72
73
74
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: katib-mysql
namespace: kubeflow
labels:
katib.kubeflow.org/component: mysql
spec:
replicas: 1
selector:
matchLabels:
katib.kubeflow.org/component: mysql
strategy:
type: Recreate
template:
metadata:
labels:
katib.kubeflow.org/component: mysql
annotations:
sidecar.istio.io/inject: "false"
spec:
containers:
- name: katib-mysql
image: mysql:8.0.29
args:
- --datadir
- /var/lib/mysql/datadir
env:
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: katib-mysql-secrets
key: MYSQL_ROOT_PASSWORD
- name: MYSQL_ALLOW_EMPTY_PASSWORD
value: "true"
- name: MYSQL_DATABASE
value: "katib"
ports:
- name: dbapi
containerPort: 3306
readinessProbe:
exec:
command:
- "/bin/bash"
- "-c"
- "mysql -D ${MYSQL_DATABASE} -u root -p${MYSQL_ROOT_PASSWORD} -e 'SELECT 1'"
initialDelaySeconds: 10
periodSeconds: 5
failureThreshold: 10
livenessProbe:
exec:
command:
- "/bin/bash"
- "-c"
- "mysqladmin ping -u root -p${MYSQL_ROOT_PASSWORD}"
initialDelaySeconds: 10
periodSeconds: 5
failureThreshold: 10
startupProbe:
exec:
command:
- "/bin/bash"
- "-c"
- "mysqladmin ping -u root -p${MYSQL_ROOT_PASSWORD}"
periodSeconds: 15
failureThreshold: 60
volumeMounts:
- name: katib-mysql
mountPath: /var/lib/mysql
volumes:
- name: katib-mysql
persistentVolumeClaim:
claimName: katib-mysql