-
Notifications
You must be signed in to change notification settings - Fork 2
/
deploy.yml
300 lines (300 loc) · 7.85 KB
/
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
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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
---
apiVersion: v1
kind: Service
metadata:
name: hamster-paas-service
namespace: hamster
spec:
selector:
app: hamster-paas
type: NodePort
ports:
- name: hamster-paas-web
protocol: TCP
port: 9898
targetPort: 9898
nodePort: 30314
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: hamster-paas
name: hamster-paas
namespace: hamster
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: hamster-paas
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app: hamster-paas
spec:
containers:
- image: hamstershare/hamster-pass:${hamster_paas_version}
imagePullPolicy: Always
name: hamster-paas
env:
- name: PORT
value: "9898"
- name: MEILI_SEARCH
value: "http://hamster-paas-meilisearch-service:7700"
- name: NGINX_LOG_PATH
value: "/var/log/nginx/access.log"
- name: ALINE_DB_USER
value: "root"
- name: ALINE_DB_PASSWORD
valueFrom:
configMapKeyRef:
name: hamster-aline
key: db_password
- name: ALINE_DB_HOST
value: "mysql"
- name: ALINE_DB_PORT
value: "3306"
- name: ALINE_DB_NAME
value: "aline"
- name: MYSQL_DATABASE
value: "paas"
- name: MYSQL_USER
value: "aline"
- name: MYSQL_PASSWORD
valueFrom:
configMapKeyRef:
name: hamster-aline
key: db_password
- name: MYSQL_ROOT_PASSWORD
valueFrom:
configMapKeyRef:
name: hamster-aline
key: db_password
- name: MYSQL_HOST
value: "mysql"
- name: MYSQL_PORT
value: "3306"
- name: FROM_EMAIL
value: "[email protected]"
- name: EMAIL_PASSWORD
valueFrom:
configMapKeyRef:
name: hamster-aline
key: email_password
- name: NODE_URL
valueFrom:
configMapKeyRef:
name: hamster-aline
key: node_url
- name: TOKEN_ADDRESS
valueFrom:
configMapKeyRef:
name: hamster-aline
key: token_address
- name: VERIFY_IDENTITY
valueFrom:
configMapKeyRef:
name: hamster-aline
key: VERIFY_IDENTITY
- name: ZAN_API_ENDPOINT
valueFrom:
configMapKeyRef:
name: hamster-paas
key: ZAN_API_ENDPOINT
- name: ZAN_DEFAULT_ACCESS_TOKEN
valueFrom:
configMapKeyRef:
name: hamster-paas
key: ZAN_DEFAULT_ACCESS_TOKEN
- name: ZAN_CLIENT_ID
valueFrom:
configMapKeyRef:
name: hamster-paas
key: ZAN_CLIENT_ID
- name: ZAN_PRIVATE_KEY_PATH
value: "/app/cert/rsa_private_key_pkcs8.pem"
- name: JWT_SECRET
valueFrom:
configMapKeyRef:
name: hamster-aline
key: JWT_SECRET
resources: {}
ports:
- containerPort: 9898
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /var/log/nginx
name: hamster-paas-nginx-log
- mountPath: /app/cert
name: zan-private-key
- name: dfx-config
mountPath: /home/ubuntu/.config/dfx
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
volumes:
- name: hamster-paas-nginx-log
persistentVolumeClaim:
claimName: hamster-paas-nginx-pvc
- name: zan-private-key
configMap:
defaultMode: 420
items:
- key: rsa_private_key_pkcs8.pem
path: rsa_private_key_pkcs8.pem
name: hamster-paas
- name: dfx-config
persistentVolumeClaim:
claimName: dfx-config
---
apiVersion: v1
kind: Service
metadata:
name: hamster-paas-nginx-service
namespace: hamster
spec:
selector:
app: hamster-paas-nginx
type: NodePort
ports:
- name: hamster-paas-nginx
protocol: TCP
port: 9912
targetPort: 80
nodePort: 30311
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: hamster-paas-nginx
name: hamster-paas-nginx
namespace: hamster
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: hamster-paas-nginx
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app: hamster-paas-nginx
spec:
containers:
- image: nginx
imagePullPolicy: Always
name: hamster-paas-nginx
resources: {}
ports:
- containerPort: 80
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- name: configmap-hamster-paas-nginx
mountPath: /etc/nginx/nginx.conf
subPath: nginx.conf
- mountPath: /var/log/nginx
name: hamster-paas-nginx-log
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
volumes:
- name: configmap-hamster-paas-nginx
configMap:
name: hamster-paas-nginx-config
- name: hamster-paas-nginx-log
persistentVolumeClaim:
claimName: hamster-paas-nginx-pvc
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: hamster-paas-nginx-pvc
namespace: hamster
spec:
accessModes:
- ReadWriteMany
storageClassName: longhorn
resources:
requests:
storage: 10Gi
---
apiVersion: v1
kind: Service
metadata:
name: hamster-paas-meilisearch-service
namespace: hamster
spec:
selector:
app: hamster-paas-meilisearch
type: NodePort
ports:
- name: hamster-paas-meilisearch
protocol: TCP
port: 7700
targetPort: 7700
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: hamster-paas-meilisearch
name: hamster-paas-meilisearch
namespace: hamster
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: hamster-paas-meilisearch
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app: hamster-paas-meilisearch
spec:
containers:
- image: getmeili/meilisearch:v1.0
imagePullPolicy: Always
name: hamster-paas-meilisearch
resources: {}
ports:
- containerPort: 7700
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /var/log/nginx
name: hamster-paas-nginx-log
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
volumes:
- name: hamster-paas-nginx-log
persistentVolumeClaim:
claimName: hamster-paas-nginx-pvc