forked from alseambusher/crontab-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.yml
647 lines (627 loc) · 15.6 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
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
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
---
apiVersion: v1
kind: Secret
metadata:
name: postgres
namespace: $OKTETO_NS
labels:
app.kubernetes.io/name: postgres
app.kubernetes.io/instance: postgres
type: Opaque
stringData:
postgres-password: $POSTGRES_PASSWORD
postgres-username: $POSTGRES_USER
postgres-db: $POSTGRES_DB
---
apiVersion: v1
kind: Secret
metadata:
name: listmonk
namespace: $OKTETO_NS
labels:
app.kubernetes.io/name: listmonk
app.kubernetes.io/instance: listmonk
type: Opaque
stringData:
listmonk-user: $LISTMONK_USER
listmonk-password: $LISTMONK_PASSWORD
ssh-pubkey: $SSH_PUBKEY
---
apiVersion: v1
kind: Secret
metadata:
name: smtpd
namespace: $OKTETO_NS
labels:
app.kubernetes.io/name: smtpd
app.kubernetes.io/instance: smtpd
type: Opaque
stringData:
cloudflare-zone-id: $CLOUDFLARE_ZONE_ID
cloudflare-api_key: $CLOUDFLARE_API_KEY
cloudflare-dns-records: $CLOUDFLARE_DNS_RECORDS
postfix-hostname: $POSTFIX_HOSTNAME
smtpd-allowed-sender-domains: $ALLOWED_SENDER_DOMAINS
smtpd-dkim-private-key: $DKIM_PRIVATE_KEY
smtpd-dkim-selector: $DKIM_SELECTOR
smtpd-postfix-hotname: POSTFIX_HOSTNAME
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: hcfmailing-pgsql
name: hcfmailing-pgsql
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
volumeMode: Filesystem
status: {}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: hcfmailing-uploads
name: hcfmailing-uploads
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
status: {}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: hcfmailing-backups
name: hcfmailing-backups
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
status: {}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: newsletter
namespace: $OKTETO_NS
annotations:
# dev.okteto.com/generate-host: "true"
spec:
rules:
- host: $OKTETO_FQDN_HCFMAILER
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: hcfmailer
port:
number: 9000
---
apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose.yml -o okteto/k8s.yml
kompose.version: 1.28.0 (c4137012e)
creationTimestamp: null
labels:
io.kompose.service: hcfmailer
name: hcfmailer
spec:
type: ClusterIP
ports:
- name: "3022"
port: 3022
targetPort: 3022
- name: "9000"
port: 9000
targetPort: 9000
selector:
io.kompose.service: hcfmailer
status:
loadBalancer: {}
---
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
io.kompose.service: postgres
name: postgres
spec:
ports:
- name: "5432"
port: 5432
targetPort: 5432
selector:
io.kompose.service: postgres
status:
loadBalancer: {}
---
apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose.yml -o okteto/k8s.yml
kompose.version: 1.28.0 (c4137012e)
creationTimestamp: null
labels:
io.kompose.service: smtpd
name: smtpd
spec:
ports:
- name: "25"
port: 25
targetPort: 25
selector:
io.kompose.service: smtpd
status:
loadBalancer: {}
---
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose.yml -o okteto/k8s.yml
kompose.version: 1.28.0 (c4137012e)
creationTimestamp: null
labels:
io.kompose.service: hcfmailer
name: hcfmailer
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: hcfmailer
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose.yml -o okteto/k8s.yml
kompose.version: 1.28.0 (c4137012e)
creationTimestamp: null
labels:
io.kompose.network/hcf-default: "true"
io.kompose.service: hcfmailer
spec:
containers:
- env:
- name: SSH_PUBKEY
valueFrom:
secretKeyRef:
name: listmonk
key: ssh-pubkey
- name: LISTMONK_app__address
value: 0.0.0.0:9000
- name: LISTMONK_app__admin_password
valueFrom:
secretKeyRef:
name: listmonk
key: listmonk-password
- name: LISTMONK_app__admin_username
valueFrom:
secretKeyRef:
name: listmonk
key: listmonk-user
- name: LISTMONK_db__database
valueFrom:
secretKeyRef:
name: postgres
key: postgres-db
- name: LISTMONK_db__host
value: postgres
- name: LISTMONK_db__password
valueFrom:
secretKeyRef:
name: postgres
key: postgres-password
- name: LISTMONK_db__port
value: "5432"
- name: LISTMONK_db__ssl_mode
value: "disable"
- name: LISTMONK_db__user
valueFrom:
secretKeyRef:
name: postgres
key: postgres-username
- name: UPDATED
value: "$TIMESTAMP"
image: highcanfly/hcfmailer:latest
name: hcfmailer
ports:
- containerPort: 3022
- containerPort: 9000
resources:
limits:
cpu: 900m
memory: "536870912"
volumeMounts:
- mountPath: /listmonk/uploads
name: hcfmailing-uploads
- mountPath: /listmonk/backups
name: hcfmailing-backups
volumes:
- name: hcfmailing-uploads
persistentVolumeClaim:
claimName: hcfmailing-uploads
- name: hcfmailing-backups
persistentVolumeClaim:
claimName: hcfmailing-backups
restartPolicy: Always
status: {}
---
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
io.kompose.service: postgres
name: postgres
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: postgres
strategy:
type: RollingUpdate
template:
metadata:
creationTimestamp: null
labels:
io.kompose.network/hcf-default: "true"
io.kompose.service: postgres
spec:
containers:
- env:
- name: POSTGRES_DATABASE
valueFrom:
secretKeyRef:
name: postgres
key: postgres-db
- name: POSTGRESQL_VOLUME_DIR
value: /bitnami/postgresql
- name: PGDATA
value: /bitnami/postgresql/data
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: postgres
key: postgres-password
- name: POSTGRES_USERNAME
valueFrom:
secretKeyRef:
name: postgres
key: postgres-username
- name: BITNAMI_DEBUG
value: "true"
image: bitnami/postgresql:15
name: postgres
command: ["/bin/sh","-c"]
#args: ["sleep infinity"]
args: ["useradd -u 1000 -g 0 postgres;mkdir -p /opt/bitnami/postgresql/conf; echo \"listen_addresses='*'\" >> /opt/bitnami/postgresql/conf/postgresql.conf ; echo \"host all all 0.0.0.0/0 md5\">/opt/bitnami/postgresql/conf/pg_hba.conf;echo \"host all all ::/0 md5\">>/opt/bitnami/postgresql/conf/pg_hba.conf;echo \"local all all md5\">>/opt/bitnami/postgresql/conf/pg_hba.conf;echo \"host all all 127.0.0.1/32 md5\">>/opt/bitnami/postgresql/conf/pg_hba.conf;echo \"host all all ::1/128 md5\">>/opt/bitnami/postgresql/conf/pg_hba.conf ; /opt/bitnami/scripts/postgresql/entrypoint.sh; /opt/bitnami/scripts/postgresql/run.sh"]
ports:
- containerPort: 5432
resources:
limits:
cpu: 500m
memory: "536870912"
volumeMounts:
- mountPath: /bitnami/postgresql
name: hcfmailing-pgsql
securityContext:
runAsUser: 0
runAsGroup: 0
restartPolicy: Always
volumes:
- name: hcfmailing-pgsql
persistentVolumeClaim:
claimName: hcfmailing-pgsql
status: {}
---
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose.yml -o okteto/k8s.yml
kompose.version: 1.28.0 (c4137012e)
creationTimestamp: null
labels:
io.kompose.service: smtpd
name: smtpd
spec:
replicas: 2
selector:
matchLabels:
io.kompose.service: smtpd
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose.yml -o okteto/k8s.yml
kompose.version: 1.28.0 (c4137012e)
creationTimestamp: null
labels:
io.kompose.network/hcf-default: "true"
io.kompose.service: smtpd
spec:
containers:
- env:
- name: ALLOWED_SENDER_DOMAINS
valueFrom:
secretKeyRef:
name: smtpd
key: smtpd-allowed-sender-domains
- name: DKIM_PRIVATE_KEY
valueFrom:
secretKeyRef:
name: smtpd
key: smtpd-dkim-private-key
- name: DKIM_SELECTOR
valueFrom:
secretKeyRef:
name: smtpd
key: smtpd-dkim-selector
- name: CLOUDFLARE_ZONE_ID
valueFrom:
secretKeyRef:
name: smtpd
key: cloudflare-zone-id
- name: CLOUDFLARE_API_KEY
valueFrom:
secretKeyRef:
name: smtpd
key: cloudflare-api_key
- name: CLOUDFLARE_DNS_RECORDS
valueFrom:
secretKeyRef:
name: smtpd
key: cloudflare-dns-records
- name: POSTFIX_HOSTNAME
valueFrom:
secretKeyRef:
name: smtpd
key: postfix-hostname
- name: POSTFIX_myhostname
valueFrom:
secretKeyRef:
name: smtpd
key: postfix-hostname
- name: POSTFIX_helo_name
valueFrom:
secretKeyRef:
name: smtpd
key: postfix-hostname
image: highcanfly/smtp-relay:latest
name: smtpd
ports:
- containerPort: 25
resources:
limits:
cpu: 900m
memory: "322122547"
volumeMounts:
- mountPath: /listmonk/backups
name: hcfmailing-backups
volumes:
- name: hcfmailing-backups
persistentVolumeClaim:
claimName: hcfmailing-backups
restartPolicy: Always
status: {}
---
apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose.yml -o okteto/k8s.yml
kompose.version: 1.28.0 (c4137012e)
creationTimestamp: null
labels:
io.kompose.service: webssh
name: webssh
spec:
type: ClusterIP
ports:
- name: "8888"
port: 8888
targetPort: 8888
selector:
io.kompose.service: webssh
status:
loadBalancer: {}
---
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose.yml -o okteto/k8s.yml
kompose.version: 1.28.0 (c4137012e)
creationTimestamp: null
labels:
io.kompose.service: webssh
name: webssh
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: webssh
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose.yml -o okteto/k8s.yml
kompose.version: 1.28.0 (c4137012e)
creationTimestamp: null
labels:
io.kompose.network/hcf-default: "true"
io.kompose.service: webssh
spec:
containers:
- env:
- name: LISTMONK_SSH
value: "3022"
image: highcanfly/webssh:latest
name: webssh
ports:
- containerPort: 8888
resources:
limits:
cpu: 500m
memory: "536870912"
restartPolicy: Always
status: {}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: admin
namespace: $OKTETO_NS
annotations:
# dev.okteto.com/generate-host: "true"
spec:
rules:
- host: admin-$OKTETO_NS.cloud.okteto.net
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: webssh
port:
number: 8888
---
apiVersion: v1
kind: Secret
metadata:
name: pgadmin
namespace: $OKTETO_NS
labels:
app.kubernetes.io/name: pgadmin
app.kubernetes.io/instance: pgadmin
type: Opaque
stringData:
pgadmin-email: $PGADMIN_DEFAULT_EMAIL
pgadmin-password: $PGADMIN_DEFAULT_PASSWORD
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: pgadmin-data
name: pgadmin-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
volumeMode: Filesystem
status: {}
---
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
io.kompose.service: pgadmin
name: pgadmin
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: pgadmin
strategy:
type: RollingUpdate
template:
metadata:
creationTimestamp: null
labels:
io.kompose.network/hcf-default: "true"
io.kompose.service: pgadmin
spec:
containers:
- env:
- name: PGADMIN_DEFAULT_EMAIL
valueFrom:
secretKeyRef:
name: pgadmin
key: pgadmin-email
- name: PGADMIN_DEFAULT_PASSWORD
valueFrom:
secretKeyRef:
name: pgadmin
key: pgadmin-password
image: dpage/pgadmin4:latest
name: pgadmin
ports:
- containerPort: 80
resources:
limits:
cpu: 250m
memory: "214748364"
volumeMounts:
- mountPath: /var/lib/pgadmin
name: pgadmin-data
securityContext:
runAsUser: 0
runAsGroup: 0
restartPolicy: Always
volumes:
- name: pgadmin-data
persistentVolumeClaim:
claimName: pgadmin-data
status: {}
---
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
io.kompose.service: pgadmin
name: pgadmin
spec:
ports:
- name: "80"
port: 80
targetPort: 80
selector:
io.kompose.service: pgadmin
status:
loadBalancer: {}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: pgadmin
namespace: $OKTETO_NS
annotations:
# dev.okteto.com/generate-host: "true"
spec:
rules:
- host: pgadmin-$OKTETO_NS.cloud.okteto.net
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: pgadmin
port:
number: 80