-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployment_local.yaml
168 lines (168 loc) · 4.22 KB
/
deployment_local.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: app
namespace: horrible-stats
spec:
replicas: 1
selector:
matchLabels:
name: app
template:
metadata:
labels:
name: app
run: stats-app
spec:
containers:
- name: app
image: localhost:32000/horrible_stats:latest
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: "/etc/keys/dcs-storage-gcs.json"
- name: DATABASE_URL
value: postgresql://db:5432/dcs?user=prod&password=pwd
- name: TACVIEW_DSN
value: postgresql://db:5432/dcs?user=prod&password=pwd
- name: WEB_CONCURRENCY
value: "4"
- name: BIND
value: "0.0.0.0:8080"
ports:
- containerPort: 8080
volumeMounts:
- name: dcs-storage-gcs
mountPath: "/etc/keys/"
readOnly: true
volumes:
- name: dcs-storage-gcs
secret:
secretName: dcs-storage-gcs
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: stat-updater
namespace: horrible-stats
spec:
replicas: 1
selector:
matchLabels:
name: stat-updater
template:
metadata:
labels:
name: stat-updater
spec:
containers:
- name: stat-updater
image: localhost:32000/horrible_stats:latest
command: ["python", "file_updater.py"]
args: ["--prefix", "mission-stats", "--interval", "10"]
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: "/etc/keys/dcs-storage-gcs.json"
- name: DATABASE_URL
value: postgresql://db:5432/dcs?user=prod&password=pwd
- name: TACVIEW_DSN
value: postgresql://db:5432/dcs?user=prod&password=pwd
volumeMounts:
- name: dcs-storage-gcs
mountPath: "/etc/keys/"
readOnly: true
volumes:
- name: dcs-storage-gcs
secret:
secretName: dcs-storage-gcs
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: event-updater
namespace: horrible-stats
spec:
replicas: 1
selector:
matchLabels:
name: event-updater
template:
metadata:
labels:
name: event-updater
spec:
containers:
- name: event-updater
image: localhost:32000/horrible_stats:latest
command: ["python", "file_updater.py"]
args: ["--prefix", "mission-events", "--interval", "10"]
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: "/etc/keys/dcs-storage-gcs.json"
- name: DATABASE_URL
value: postgresql://db:5432/dcs?user=prod&password=pwd
- name: TACVIEW_DSN
value: postgresql://db:5432/dcs?user=prod&password=pwd
volumeMounts:
- name: dcs-storage-gcs
mountPath: "/etc/keys/"
readOnly: true
volumes:
- name: dcs-storage-gcs
secret:
secretName: dcs-storage-gcs
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: tacview-updater
namespace: horrible-stats
spec:
replicas: 1
selector:
matchLabels:
name: tacview-updater
template:
metadata:
labels:
name: tacview-updater
spec:
containers:
- name: tacview-updater
image: localhost:32000/horrible_stats:latest
command: ["python", "file_updater.py"]
args: ["--prefix", "tacview", "--interval", "5"]
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: "/etc/keys/dcs-storage-gcs.json"
- name: DATABASE_URL
value: postgresql://db:5432/dcs?user=prod&password=pwd
- name: TACVIEW_DSN
value: postgresql://db:5432/dcs?user=prod&password=pwd
volumeMounts:
- name: dcs-storage-gcs
mountPath: "/etc/keys/"
readOnly: true
volumes:
- name: dcs-storage-gcs
secret:
secretName: dcs-storage-gcs
---
apiVersion: v1
kind: Service
metadata:
namespace: horrible-stats
name: app-svc
labels:
name: app-svc
spec:
type: LoadBalancer
loadBalancerIP: "35.226.240.39"
ports:
- port: 80
targetPort: 8080
name: http
- port: 443
targetPort: 8080
name: https
selector:
name: app