-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathkubernetes-deployment.yml
234 lines (234 loc) · 5.19 KB
/
kubernetes-deployment.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
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: mangosfour-mysql
spec:
selector:
matchLabels:
app: mangosfour-mysql
serviceName: mangosfour-mysql
replicas: 1
template:
metadata:
labels:
app: mangosfour-mysql
spec:
containers:
- name: mangosfour-mysql
image: ssorriaux/mangosfour-database-mysql:latest
env:
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: "mangosfour-secret"
key: "MYSQL_ROOT_PASSWORD"
ports:
- name: mysql
containerPort: 3306
volumeMounts:
- name: data
mountPath: /var/lib/mysql
subPath: mysql
resources:
requests:
cpu: 200m
memory: 256Mi
livenessProbe:
tcpSocket:
port: 3306
initialDelaySeconds: 120
periodSeconds: 15
timeoutSeconds: 5
readinessProbe:
tcpSocket:
port: 3306
initialDelaySeconds: 30
periodSeconds: 15
timeoutSeconds: 5
failureThreshold: 30
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 10Gi
---
apiVersion: v1
kind: Service
metadata:
name: mangosfour-mysql
labels:
app: mangosfour-mysql
spec:
ports:
- name: mysql
port: 3306
clusterIP: None
selector:
app: mangosfour-mysql
---
apiVersion: v1
kind: Secret
metadata:
name: mangosfour-secret
type: Opaque
data:
MYSQL_ROOT_PASSWORD: bWFuZ29z
LOGIN_DATABASE_INFO: bWFuZ29zZm91ci1teXNxbDszMzA2O3Jvb3Q7bWFuZ29zO3JlYWxtZA==
WORLD_DATABASE_INFO: bWFuZ29zZm91ci1teXNxbDszMzA2O3Jvb3Q7bWFuZ29zO21hbmdvczQ=
CHARACTER_DATABASE_INFO: bWFuZ29zZm91ci1teXNxbDszMzA2O3Jvb3Q7bWFuZ29zO2NoYXJhY3RlcjQ=
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: mangosfour-server
labels:
app: mangosfour-server
spec:
replicas: 1
selector:
matchLabels:
app: mangosfour-server
template:
metadata:
labels:
app: mangosfour-server
spec:
containers:
- name: mangosfour-server
image: ssorriaux/mangosfour-server:latest
stdin: true
tty: true
env:
- name: LOGIN_DATABASE_INFO
valueFrom:
secretKeyRef:
name: "mangosfour-secret"
key: "LOGIN_DATABASE_INFO"
- name: WORLD_DATABASE_INFO
valueFrom:
secretKeyRef:
name: "mangosfour-secret"
key: "WORLD_DATABASE_INFO"
- name: CHARACTER_DATABASE_INFO
valueFrom:
secretKeyRef:
name: "mangosfour-secret"
key: "CHARACTER_DATABASE_INFO"
ports:
- name: "mangos-server"
containerPort: 8085
volumeMounts:
- name: mangos-maps
mountPath: /etc/mangos/maps
- name: mangos-vmaps
mountPath: /etc/mangos/vmaps
- name: mangos-mmaps
mountPath: /etc/mangos/mmaps
- name: mangos-dbc
mountPath: /etc/mangos/dbc
resources:
requests:
cpu: 100m
memory: 256Mi
livenessProbe:
tcpSocket:
port: 8085
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
readinessProbe:
tcpSocket:
port: 8085
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
volumes:
- name: mangos-maps
hostPath:
path: /tmp
- name: mangos-vmaps
hostPath:
path: /tmp
- name: mangos-mmaps
hostPath:
path: /tmp
- name: mangos-dbc
hostPath:
path: /tmp
---
apiVersion: v1
kind: Service
metadata:
name: mangosfour-server
labels:
app: mangosfour-server
spec:
ports:
- name: mangos-server
port: 8085
clusterIP: None
selector:
app: mangosfour-server
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: mangosfour-realmd
labels:
app: mangosfour-realmd
spec:
replicas: 1
selector:
matchLabels:
app: mangosfour-realmd
template:
metadata:
labels:
app: mangosfour-realmd
spec:
containers:
- name: mangosfour-realmd
image: ssorriaux/mangosfour-realmd:latest
env:
- name: LOGIN_DATABASE_INFO
valueFrom:
secretKeyRef:
name: "mangosfour-secret"
key: "LOGIN_DATABASE_INFO"
ports:
- name: "mangos-realmd"
containerPort: 3724
resources:
requests:
cpu: 100m
memory: 128Mi
livenessProbe:
tcpSocket:
port: 3724
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
readinessProbe:
tcpSocket:
port: 3724
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
---
apiVersion: v1
kind: Service
metadata:
name: mangosfour-realmd
labels:
app: mangosfour-realmd
spec:
ports:
- name: mangos-realmd
port: 3724
clusterIP: None
selector:
app: mangosfour-realmd