-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevspace.yaml
349 lines (320 loc) · 9.43 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
---
version: v2beta1
name: splunk-arcade-scoreboard
vars:
DEVSPACE_FLAGS: "-n splunk-arcade"
SPLUNK_ARCADE_REGISTRY:
source: env
default: splunk-arcade
SPLUNK_ARCADE_LOCAL_REGISTRY_ENABLED:
source: env
default: true
SPLUNK_ARCADE_OBSERVABILITY_ENV:
source: env
default: gameify
SPLUNK_ARCADE_OBSERVABILITY_REALM:
source: env
default: us1
SPLUNK_ARCADE_OBSERVABILITY_ACCESS_TOKEN:
source: env
default: REPLACE_ME
SPLUNK_ARCADE_PLATFORM_ENDPOINT:
source: env
default: https://127.0.0.1:8088/services/collector
SPLUNK_ARCADE_PLATFORM_TOKEN:
source: env
default: REPLACE_ME
SPLUNK_ARCADE_OBSERVABILITY_API_ACCESS_TOKEN:
source: env
default: REPLACE_ME
SPLUNK_ARCADE_OPENAI_API_KEY:
source: env
default: ""
IMAGE_PULL_POLICY: Always
CABINET_IMAGE: ${SPLUNK_ARCADE_REGISTRY}/cabinet
SCOREBOARD_IMAGE: ${SPLUNK_ARCADE_REGISTRY}/scoreboard
PORTAL_IMAGE: ${SPLUNK_ARCADE_REGISTRY}/portal
PLAYER_CONTENT_IMAGE: ${SPLUNK_ARCADE_REGISTRY}/player-content
PLAYER_ROUTER_IMAGE: ${SPLUNK_ARCADE_REGISTRY}/player-router
PY_IMAGE_DEV: ${SPLUNK_ARCADE_REGISTRY}/py-dev
GO_IMAGE_DEV: ${SPLUNK_ARCADE_REGISTRY}/go-dev
VERSION: 0.0.0
COMMIT_HASH: $(git describe --always --abbrev=8)
localRegistry:
enabled: ${SPLUNK_ARCADE_LOCAL_REGISTRY_ENABLED}
images:
py-dev:
createPullSecret: false
image: ${PY_IMAGE_DEV}
context: ./
dockerfile: ./dev.py.Dockerfile
rebuildStrategy: ignoreContextChanges
tags:
- ${COMMIT_HASH}
go-dev:
createPullSecret: false
image: ${GO_IMAGE_DEV}
context: ./
dockerfile: ./dev.go.Dockerfile
rebuildStrategy: ignoreContextChanges
tags:
- ${COMMIT_HASH}
cabinet:
createPullSecret: false
image: ${CABINET_IMAGE}
context: ./cabinet
dockerfile: ./cabinet/Dockerfile
rebuildStrategy: ignoreContextChanges
tags:
- latest
- ${COMMIT_HASH}
scoreboard:
createPullSecret: false
image: ${SCOREBOARD_IMAGE}
context: ./scoreboard
dockerfile: ./scoreboard/Dockerfile
rebuildStrategy: ignoreContextChanges
tags:
- latest
- ${COMMIT_HASH}
portal:
createPullSecret: false
image: ${PORTAL_IMAGE}
context: ./portal
dockerfile: ./portal/Dockerfile
rebuildStrategy: ignoreContextChanges
tags:
- latest
- ${COMMIT_HASH}
player-content:
createPullSecret: false
image: ${PLAYER_CONTENT_IMAGE}
context: ./player-content
dockerfile: ./player-content/Dockerfile
rebuildStrategy: ignoreContextChanges
tags:
- latest
- ${COMMIT_HASH}
player-router:
createPullSecret: false
image: ${PLAYER_ROUTER_IMAGE}
context: ./player-router
dockerfile: ./player-router/Dockerfile
rebuildStrategy: ignoreContextChanges
tags:
- latest
- ${COMMIT_HASH}
deployments:
splunk-arcade:
helm:
displayOutput: true
chart:
name: ./chart/
values:
openaiApiKey: ${SPLUNK_ARCADE_OPENAI_API_KEY}
observabilityApiAccessToken: ${SPLUNK_ARCADE_OBSERVABILITY_API_ACCESS_TOKEN}
splunk-otel-collector:
environment: ${SPLUNK_ARCADE_OBSERVABILITY_ENV}
splunkObservability:
realm: ${SPLUNK_ARCADE_OBSERVABILITY_REALM}
accessToken: ${SPLUNK_ARCADE_OBSERVABILITY_ACCESS_TOKEN}
splunkPlatform:
endpoint: ${SPLUNK_ARCADE_PLATFORM_ENDPOINT}
token: ${SPLUNK_ARCADE_PLATFORM_TOKEN}
cabinet:
image: ${CABINET_IMAGE}
imagePullPolicy: ${IMAGE_PULL_POLICY}
scoreboard:
image: ${SCOREBOARD_IMAGE}
imagePullPolicy: ${IMAGE_PULL_POLICY}
portal:
image: ${PORTAL_IMAGE}
imagePullPolicy: ${IMAGE_PULL_POLICY}
playerContent:
image: ${PLAYER_CONTENT_IMAGE}
imagePullPolicy: ${IMAGE_PULL_POLICY}
playerRouter:
image: ${PLAYER_ROUTER_IMAGE}
imagePullPolicy: ${IMAGE_PULL_POLICY}
dev:
splunk-arcade:
labelSelector:
app.kubernetes.io/name: splunk-arcade-cabinet
devImage: ${CABINET_IMAGE_DEV}
sync:
- path: ./cabinet/:/app
disableDownload: true
excludeFile: .dockerignore
terminal:
command: ./start-dev.sh
ports:
- port: "8080:5000"
profiles:
- name: prod
patches:
# persistence for prod in case registry dies for whatever reason
- op: add
path: localRegistry.persistence
value:
enabled: true
size: 10Gi
# prod host + tls ofc
- op: add
path: deployments.splunk-arcade.helm.values.arcadeHost
value: www.splunkarcade.com
- op: add
path: deployments.splunk-arcade.helm.values.tls
value:
enabled: true
# crank up some replicas for things for prod
- op: add
path: deployments.splunk-arcade.helm.values.scoreboard.replicaCount
value: 3
- op: add
path: deployments.splunk-arcade.helm.values.portal.replicaCount
value: 3
- op: add
path: deployments.splunk-arcade.helm.values.playerRouter.replicaCount
value: 5
- op: add
path: deployments.splunk-arcade.helm.values.playerContent.replicaCount
value: 3
# set to IfNotPresent for image pull for prod
- op: replace
path: deployments.splunk-arcade.helm.values.scoreboard.imagePullPolicy
value: IfNotPresent
- op: replace
path: deployments.splunk-arcade.helm.values.portal.imagePullPolicy
value: IfNotPresent
- op: replace
path: deployments.splunk-arcade.helm.values.playerRouter.imagePullPolicy
value: IfNotPresent
- op: replace
path: deployments.splunk-arcade.helm.values.playerContent.imagePullPolicy
value: IfNotPresent
# ensure we always use tagged version for the real deal
- op: replace
path: images.cabinet.tags
value:
- ${COMMIT_HASH}
- op: replace
path: images.scoreboard.tags
value:
- ${COMMIT_HASH}
- op: replace
path: images.portal.tags
value:
- ${COMMIT_HASH}
- op: replace
path: images.player-content.tags
value:
- ${COMMIT_HASH}
- op: replace
path: images.player-router.tags
value:
- ${COMMIT_HASH}
- name: dev-cabinet
patches:
- op: add
path: deployments.splunk-arcade.helm.values.players
value:
- devplayer
- op: replace
path: dev
value:
splunk-arcade:
labelSelector:
app.kubernetes.io/name: splunk-arcade-cabinet
devImage: ${PY_IMAGE_DEV}
sync:
- path: ./cabinet/:/app
disableDownload: true
excludeFile: .dockerignore
terminal:
command: ./start-dev.sh
ports:
- port: "8080:5000"
- name: dev-player-router
patches:
- op: add
path: deployments.splunk-arcade.helm.values.players
value:
- devplayer
- op: add
path: deployments.splunk-arcade.helm.values.playerRouter.replicaCount
value: 1
- op: replace
path: dev
value:
splunk-arcade:
labelSelector:
app.kubernetes.io/name: splunk-arcade-player-router
devImage: ${GO_IMAGE_DEV}
sync:
- path: ./player-router/:/app
disableDownload: true
excludeFile: .dockerignore
terminal:
command: ./start-dev.sh
ports:
- port: "8080:5000"
- name: dev-scoreboard
patches:
- op: replace
path: dev
value:
splunk-arcade:
labelSelector:
app.kubernetes.io/name: splunk-arcade-scoreboard
devImage: ${PY_IMAGE_DEV}
sync:
- path: ./scoreboard/:/app
disableDownload: true
excludeFile: .dockerignore
terminal:
command: ./start-dev.sh
ports:
- port: "8080:5000"
- name: dev-portal
patches:
- op: replace
path: dev
value:
splunk-arcade:
labelSelector:
app.kubernetes.io/name: splunk-arcade-portal
devImage: ${PY_IMAGE_DEV}
sync:
- path: ./portal/:/app
disableDownload: true
excludeFile: .dockerignore
terminal:
command: ./start-dev.sh
ports:
- port: "8080:5000"
- name: dev-player-content
patches:
- op: replace
path: dev
value:
splunk-arcade:
labelSelector:
app.kubernetes.io/name: splunk-arcade-player-content
devImage: ${PY_IMAGE_DEV}
sync:
- path: ./player-content/:/app
disableDownload: true
excludeFile: .dockerignore
terminal:
command: ./start-dev.sh
ports:
- port: "8080:5000"
pipelines:
# override the default purge pipeline so we can nuke registry too
purge:
run: |-
stop_dev --all
purge_deployments --all
kubectl delete deployments -n ${DEVSPACE_NAMESPACE} registry || true
kubectl delete statefulsets -n ${DEVSPACE_NAMESPACE} registry || true
kubectl delete pvc -n ${DEVSPACE_NAMESPACE} registry-registry-0 || true