-
Notifications
You must be signed in to change notification settings - Fork 0
/
02-liferay-mysql.yaml
98 lines (95 loc) · 1.88 KB
/
02-liferay-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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
apiVersion: v1
kind: Service
metadata:
name: liferay-mysql
namespace: liferay
labels:
app: liferay
tier: mysql
spec:
type: ClusterIP
ports:
- port: 3306
selector:
app: liferay
tier: mysql
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: liferay-mysql-pvc
namespace: liferay
labels:
app: liferay
tier: mysql
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: liferay-mysql
namespace: liferay
labels:
app: liferay
tier: mysql
spec:
replicas: 1
selector:
matchLabels:
app: liferay
tier: mysql
strategy:
type: Recreate
template:
metadata:
namespace: liferay
labels:
app: liferay
tier: mysql
spec:
containers:
- name: mysql
image: mysql:5.7.43
resources:
requests:
memory: "200Mi"
limits:
memory: "512Mi"
args:
- "--ignore-db-dir=lost+found"
env:
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: liferay-db-root
key: password
- name: MYSQL_DATABASE
valueFrom:
secretKeyRef:
name: liferay-db-creds
key: dbname
- name: MYSQL_USER
valueFrom:
secretKeyRef:
name: liferay-db-creds
key: username
- name: MYSQL_PASSWORD
valueFrom:
secretKeyRef:
name: liferay-db-creds
key: password
ports:
- containerPort: 3306
name: mysql
volumeMounts:
- name: liferay-mysql-storage
mountPath: /var/lib/mysql
volumes:
- name: liferay-mysql-storage
persistentVolumeClaim:
claimName: liferay-mysql-pvc