forked from CyberDiscovery/cyberdisc-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deployment.yaml
109 lines (109 loc) · 2.32 KB
/
deployment.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
apiVersion: "v1"
kind: "Service"
metadata:
name: "postgres"
labels:
app: "postgres"
spec:
ports:
- port: 5432
name: "postgres"
clusterIP: "None"
selector:
app: "postgres"
---
apiVersion: "apps/v1"
kind: "Deployment"
metadata:
name: "postgres"
spec:
replicas: 1
selector:
matchLabels:
app: "postgres"
template:
metadata:
labels:
app: "postgres"
spec:
containers:
- name: "postgres"
image: "postgres:11"
env:
- name: "POSTGRES_DB"
valueFrom:
secretKeyRef:
name: "creds"
key: "PGDATABASE"
- name: "POSTGRES_USER"
valueFrom:
secretKeyRef:
name: "creds"
key: "PGUSER"
- name: "POSTGRES_PASSWORD"
valueFrom:
secretKeyRef:
name: "creds"
key: "PGPASSWORD"
ports:
- containerPort: 5432
name: postgredb
---
apiVersion: "apps/v1"
kind: "Deployment"
metadata:
name: "cyberdisc-bot"
namespace: "default"
labels:
app: "cyberdisc-bot"
spec:
replicas: 1
selector:
matchLabels:
app: "cyberdisc-bot"
template:
metadata:
labels:
app: "cyberdisc-bot"
spec:
containers:
- name: "cyberdisc-bot"
image: "cyberdiscovery/cdbot:latest"
env:
- name: "BOT_TOKEN"
valueFrom:
secretKeyRef:
name: "creds"
key: "BOT_TOKEN"
- name: "PGHOST"
value: "postgres"
- name: "PGPORT"
valueFrom:
secretKeyRef:
name: "creds"
key: "PGPORT"
- name: "PGDATABASE"
valueFrom:
secretKeyRef:
name: "creds"
key: "PGDATABASE"
- name: "PGUSER"
valueFrom:
secretKeyRef:
name: "creds"
key: "PGUSER"
- name: "PGPASSWORD"
valueFrom:
secretKeyRef:
name: "creds"
key: "PGPASSWORD"
- name: "SENTRY_URL"
valueFrom:
secretKeyRef:
name: "creds"
key: "SENTRY_URL"
- name: "MATHS_TOKEN"
valueFrom:
secretKeyRef:
name: "creds"
key: "MATHS_TOKEN"