This repository has been archived by the owner on Mar 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
devspace.yaml
614 lines (604 loc) · 15.8 KB
/
devspace.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
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
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
version: v1beta9
images:
api:
image: williamdasilva/checkmark-api
dockerfile: ./apps/api/Dockerfile
context: ./apps/api
tags:
- ${DEVSPACE_RANDOM}
- latest
preferSyncOverRebuild: true
injectRestartHelper: true
build:
docker:
options:
target: release
www:
image: williamdasilva/checkmark-www
dockerfile: ./apps/www/Dockerfile
context: ./apps/www
preferSyncOverRebuild: true
injectRestartHelper: true
build:
docker:
options:
target: release
discord-bot:
image: williamdasilva/checkmark-discord-bot
dockerfile: ./apps/discord-bot/Dockerfile
context: ./apps/discord-bot
preferSyncOverRebuild: true
injectRestartHelper: true
build:
docker:
options:
target: release
deployments:
- name: redis
helm:
componentChart: true
values:
containers:
- image: redis:6.0
args: ["--requirepass", "$(REDIS_PASSWORD)"]
resources:
limits:
cpu: 500m
memory: 1Gi
ephemeralStorage: 500Mi
env:
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: redis-secret
key: REDIS_PASSWORD
volumeMounts:
- containerPath: /data
volume:
name: redis-data
subPath: /data
readOnly: false
volumes:
- name: redis-data
size: "1Gi"
service:
type: ClusterIP
ports:
- port: 6379
- name: redis-replica
helm:
componentChart: true
values:
replicas: 2
rollingUpdate:
enabled: true
maxSurge: "100%"
maxUnavailable: "50%"
containers:
- image: redis:6.0
args: ["--requirepass", "$(REDIS_PASSWORD)", "--replicaof", "redis", "6379", "--masterauth", "$(REDIS_PASSWORD)"]
resources:
limits:
cpu: 500m
memory: 1Gi
ephemeralStorage: 500Mi
env:
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: redis-secret
key: REDIS_PASSWORD
volumeMounts:
- containerPath: /data
volume:
name: redis-replica-data
subPath: /data
readOnly: false
volumes:
- name: redis-replica-data
size: "1Gi"
service:
type: ClusterIP
ports:
- port: 6379
- name: api
helm:
componentChart: true
values:
replicas: 2
rollingUpdate:
enabled: true
maxSurge: "100%"
maxUnavailable: "50%"
# initContainers:
# - image: williamdasilva/checkmark-api
# resources:
# limits:
# cpu: 100m
# memory: 500Mi
# command: ["bash"]
# args: ["-c", "rake db:migrate"]
# env:
# - name: HOST
# value: "0.0.0.0"
# - name: PORT
# value: "3000"
# - name: HOST
# valueFrom:
# secretKeyRef:
# name: api-secret
# key: HOST
# - name: RAILS_ENV
# valueFrom:
# secretKeyRef:
# name: api-secret
# key: RAILS_ENV
# - name: RAILS_SERVE_STATIC_FILES
# valueFrom:
# secretKeyRef:
# name: api-secret
# key: RAILS_SERVE_STATIC_FILES
# - name: SECRET_KEY_BASE
# valueFrom:
# secretKeyRef:
# name: api-secret
# key: SECRET_KEY_BASE
# - name: SENTRY_DSN
# valueFrom:
# secretKeyRef:
# name: api-secret
# key: SENTRY_DSN
# - name: DATABASE_NAME
# valueFrom:
# secretKeyRef:
# name: api-secret
# key: DATABASE_NAME
# - name: DATABASE_USERNAME
# valueFrom:
# secretKeyRef:
# name: api-secret
# key: DATABASE_USERNAME
# - name: DATABASE_PASSWORD
# valueFrom:
# secretKeyRef:
# name: api-secret
# key: DATABASE_PASSWORD
# - name: DATABASE_HOST
# valueFrom:
# secretKeyRef:
# name: api-secret
# key: DATABASE_HOST
# - name: DATABASE_PORT
# valueFrom:
# secretKeyRef:
# name: api-secret
# key: DATABASE_PORT
containers:
- image: williamdasilva/checkmark-api
resources:
limits:
cpu: 400m
memory: 1Gi
env:
- name: HOST
value: "0.0.0.0"
- name: PORT
value: "3000"
- name: HOST
valueFrom:
secretKeyRef:
name: api-secret
key: HOST
- name: RAILS_ENV
valueFrom:
secretKeyRef:
name: api-secret
key: RAILS_ENV
- name: RAILS_SERVE_STATIC_FILES
valueFrom:
secretKeyRef:
name: api-secret
key: RAILS_SERVE_STATIC_FILES
- name: SECRET_KEY_BASE
valueFrom:
secretKeyRef:
name: api-secret
key: SECRET_KEY_BASE
- name: SENTRY_DSN
valueFrom:
secretKeyRef:
name: api-secret
key: SENTRY_DSN
- name: DATABASE_NAME
valueFrom:
secretKeyRef:
name: api-secret
key: DATABASE_NAME
- name: DATABASE_USERNAME
valueFrom:
secretKeyRef:
name: api-secret
key: DATABASE_USERNAME
- name: DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: api-secret
key: DATABASE_PASSWORD
- name: DATABASE_HOST
valueFrom:
secretKeyRef:
name: api-secret
key: DATABASE_HOST
- name: DATABASE_PORT
valueFrom:
secretKeyRef:
name: api-secret
key: DATABASE_PORT
- name: WEB_BASE
valueFrom:
secretKeyRef:
name: api-secret
key: WEB_BASE
- name: MJML_HOST
valueFrom:
secretKeyRef:
name: api-secret
key: MJML_HOST
- name: MJML_PORT
valueFrom:
secretKeyRef:
name: api-secret
key: MJML_PORT
- name: SMTP_ADDRESS
valueFrom:
secretKeyRef:
name: api-secret
key: SMTP_ADDRESS
- name: SMTP_PORT
valueFrom:
secretKeyRef:
name: api-secret
key: SMTP_PORT
- name: SMTP_USER_NAME
valueFrom:
secretKeyRef:
name: api-secret
key: SMTP_USER_NAME
- name: SMTP_PASSWORD
valueFrom:
secretKeyRef:
name: api-secret
key: SMTP_PASSWORD
- name: REDIS_URL
valueFrom:
secretKeyRef:
name: api-secret
key: REDIS_URL
- name: ASSET_HOST
valueFrom:
secretKeyRef:
name: api-secret
key: ASSET_HOST
- name: S3_ENDPOINT
valueFrom:
secretKeyRef:
name: api-secret
key: S3_ENDPOINT
- name: S3_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: api-secret
key: S3_ACCESS_KEY_ID
- name: S3_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: api-secret
key: S3_SECRET_ACCESS_KEY
- name: S3_REGION
valueFrom:
secretKeyRef:
name: api-secret
key: S3_REGION
- name: S3_BUCKET
valueFrom:
secretKeyRef:
name: api-secret
key: S3_BUCKET
ingress:
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
cert-manager.io/cluster-issuer: ls-api-prod
ingressClass: nginx
tls: ls-api-prod
tlsClusterIssuer: ls-api-prod
rules:
- host: api.checkmark.dev
service:
ports:
- port: 3000
- name: sidekiq
helm:
componentChart: true
values:
replicas: 2
rollingUpdate:
enabled: true
maxSurge: "100%"
maxUnavailable: "50%"
containers:
- image: williamdasilva/checkmark-api
command: ['sidekiq-entrypoint.sh']
args: ["bundle", "exec", "sidekiq -q default -q mailers"]
resources:
limits:
cpu: 400m
memory: 1Gi
env:
- name: HOST
value: "0.0.0.0"
- name: PORT
value: "3000"
- name: HOST
valueFrom:
secretKeyRef:
name: api-secret
key: HOST
- name: RAILS_ENV
valueFrom:
secretKeyRef:
name: api-secret
key: RAILS_ENV
- name: RAILS_SERVE_STATIC_FILES
valueFrom:
secretKeyRef:
name: api-secret
key: RAILS_SERVE_STATIC_FILES
- name: SECRET_KEY_BASE
valueFrom:
secretKeyRef:
name: api-secret
key: SECRET_KEY_BASE
- name: SENTRY_DSN
valueFrom:
secretKeyRef:
name: api-secret
key: SENTRY_DSN
- name: DATABASE_NAME
valueFrom:
secretKeyRef:
name: api-secret
key: DATABASE_NAME
- name: DATABASE_USERNAME
valueFrom:
secretKeyRef:
name: api-secret
key: DATABASE_USERNAME
- name: DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: api-secret
key: DATABASE_PASSWORD
- name: DATABASE_HOST
valueFrom:
secretKeyRef:
name: api-secret
key: DATABASE_HOST
- name: DATABASE_PORT
valueFrom:
secretKeyRef:
name: api-secret
key: DATABASE_PORT
- name: WEB_BASE
valueFrom:
secretKeyRef:
name: api-secret
key: WEB_BASE
- name: ASSET_HOST
valueFrom:
secretKeyRef:
name: api-secret
key: ASSET_HOST
- name: MJML_HOST
valueFrom:
secretKeyRef:
name: api-secret
key: MJML_HOST
- name: MJML_PORT
valueFrom:
secretKeyRef:
name: api-secret
key: MJML_PORT
- name: SMTP_ADDRESS
valueFrom:
secretKeyRef:
name: api-secret
key: SMTP_ADDRESS
- name: SMTP_PORT
valueFrom:
secretKeyRef:
name: api-secret
key: SMTP_PORT
- name: SMTP_USER_NAME
valueFrom:
secretKeyRef:
name: api-secret
key: SMTP_USER_NAME
- name: SMTP_PASSWORD
valueFrom:
secretKeyRef:
name: api-secret
key: SMTP_PASSWORD
- name: REDIS_URL
valueFrom:
secretKeyRef:
name: api-secret
key: REDIS_URL
- name: S3_ENDPOINT
valueFrom:
secretKeyRef:
name: api-secret
key: S3_ENDPOINT
- name: S3_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: api-secret
key: S3_ACCESS_KEY_ID
- name: S3_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: api-secret
key: S3_SECRET_ACCESS_KEY
- name: S3_REGION
valueFrom:
secretKeyRef:
name: api-secret
key: S3_REGION
- name: S3_BUCKET
valueFrom:
secretKeyRef:
name: api-secret
key: S3_BUCKET
ingress:
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
cert-manager.io/cluster-issuer: ls-api-prod
ingressClass: nginx
tls: ls-api-prod
tlsClusterIssuer: ls-api-prod
rules:
- host: api.checkmark.dev
service:
ports:
- port: 3000
- name: www
helm:
componentChart: true
values:
replicas: 2
rollingUpdate:
enabled: true
maxSurge: "100%"
maxUnavailable: "50%"
containers:
- image: williamdasilva/checkmark-www
# readinessProbe:
# httpGet:
# path: /
# port: 8080
# initialDelaySeconds: 5
# failureThreshold: 30
# periodSeconds: 5
resources:
limits:
cpu: 400m
memory: 500Mi
env:
- name: HOST
value: "0.0.0.0"
- name: PORT
value: "8080"
- name: API_BROWSER_BASE_URL
valueFrom:
secretKeyRef:
name: www-secret
key: API_BROWSER_BASE_URL
- name: GOOGLE_ANALYTICS_ID
valueFrom:
secretKeyRef:
name: www-secret
key: GOOGLE_ANALYTICS_ID
- name: API_BASE_URL
valueFrom:
secretKeyRef:
name: www-secret
key: API_BASE_URL
- name: SENTRY_DSN
valueFrom:
secretKeyRef:
name: www-secret
key: SENTRY_DSN
- name: VUE_APP_HOTJAR_ID
valueFrom:
secretKeyRef:
name: www-secret
key: VUE_APP_HOTJAR_ID
ingress:
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
cert-manager.io/cluster-issuer: ls-www-prod
ingressClass: nginx
tls: ls-www-prod
tlsClusterIssuer: ls-www-prod
rules:
- host: checkmark.dev
- host: www.checkmark.dev
service:
ports:
- port: 8080
- name: mjml2html
helm:
componentChart: true
values:
containers:
- image: williamdasilva/mjml2html
resources:
limits:
cpu: 500m
memory: 500Mi
env:
- name: HOST
value: "0.0.0.0"
- name: PORT
value: "8082"
service:
type: ClusterIP
ports:
- port: 8082
- name: discord-bot
helm:
componentChart: true
values:
replicas: 1
rollingUpdate:
enabled: true
maxSurge: "100%"
maxUnavailable: "50%"
containers:
- image: williamdasilva/checkmark-discord-bot
resources:
limits:
cpu: 400m
memory: 500Mi
envFrom:
- configMapRef:
name: discord-bot-config
env:
- name: HOST
value: "0.0.0.0"
- name: PORT
value: "9090"
- name: DISCORD_API_TOKEN
valueFrom:
secretKeyRef:
name: discord-bot-secret
key: DISCORD_API_TOKEN
- name: API_SECRET
valueFrom:
secretKeyRef:
name: discord-bot-secret
key: API_SECRET
ingress:
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: ls-discord-bot-prod
ingressClass: nginx
tls: ls-discord-bot-prod
tlsClusterIssuer: ls-discord-bot-prod
rules:
- host: bot.checkmark.dev
service:
ports:
- port: 9090