forked from NVIDIA/infra-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevspace.yaml
More file actions
348 lines (342 loc) · 11.5 KB
/
Copy pathdevspace.yaml
File metadata and controls
348 lines (342 loc) · 11.5 KB
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
version: v2beta1
name: ncx-infra-controller-core
vars:
LOCAL_DEV_NAMESPACE:
source: env
default: nico-system
LOCAL_DEV_CERT_ISSUER_KIND:
source: env
default: Issuer
LOCAL_DEV_CERT_ISSUER_NAME:
source: env
default: local-ca-issuer
LOCAL_DEV_CERT_ISSUER_GROUP:
source: env
default: cert-manager.io
LOCAL_DEV_REST_POSTGRES_DB:
source: env
default: nico_rest
LOCAL_DEV_REST_POSTGRES_USER:
source: env
default: nico_rest
LOCAL_DEV_REST_POSTGRES_PASSWORD:
source: env
default: nico_rest
LOCAL_DEV_REST_API_FORWARD_PORT:
source: env
default: "18388"
LOCAL_DEV_KEYCLOAK_FORWARD_PORT:
source: env
default: "18082"
pipelines:
purge: |-
CONTEXT=$(kubectl config current-context 2>/dev/null || echo "")
case "$CONTEXT" in
kind-*)
LOCAL_DEV_NAMESPACE=${DEVSPACE_NAMESPACE} dev/deployment/devspace/reset-kind-cluster.sh
;;
*)
run_default_pipeline purge
;;
esac
images:
nico-api:
image: nico-api
custom:
command: |-
docker image inspect build-container-localdev >/dev/null 2>&1 || docker build --pull=false -t build-container-localdev -f dev/docker/Dockerfile.build-container-x86_64 .
docker build -t ${runtime.images.nico-api.image}:${runtime.images.nico-api.tag} -f dev/deployment/devspace/Dockerfile.api .
onChange:
- .dockerignore
- Cargo.toml
- Cargo.lock
- rust-toolchain.toml
- .cargo
- crates
- include
- dev/docker/Dockerfile.build-container-x86_64
- dev/deployment/devspace/Dockerfile.api
- pxe/templates
- pxe/static/blobs/internal/aarch64/secure-boot-pk.pem
nico-bmc-proxy:
image: nico-bmc-proxy
custom:
command: |-
docker image inspect build-container-localdev >/dev/null 2>&1 || docker build --pull=false -t build-container-localdev -f dev/docker/Dockerfile.build-container-x86_64 .
docker build -t ${runtime.images.nico-bmc-proxy.image}:${runtime.images.nico-bmc-proxy.tag} -f dev/deployment/devspace/Dockerfile.bmc-proxy .
onChange:
- .dockerignore
- Cargo.toml
- Cargo.lock
- rust-toolchain.toml
- .cargo
- crates
- dev/docker/Dockerfile.build-container-x86_64
- dev/deployment/devspace/Dockerfile.bmc-proxy
machine-a-tron:
image: machine-a-tron
custom:
command: |-
docker image inspect build-container-localdev >/dev/null 2>&1 || docker build --pull=false -t build-container-localdev -f dev/docker/Dockerfile.build-container-x86_64 .
docker build -t ${runtime.images.machine-a-tron.image}:${runtime.images.machine-a-tron.tag} -f dev/deployment/devspace/Dockerfile.machine-a-tron .
onChange:
- .dockerignore
- Cargo.toml
- Cargo.lock
- rust-toolchain.toml
- .cargo
- crates
- include
- dev/docker/Dockerfile.build-container-x86_64
- dev/deployment/devspace/Dockerfile.machine-a-tron
nico-rest-api:
image: localhost:5000/nico-rest-api
tags:
- ${DEVSPACE_GIT_COMMIT}-${DEVSPACE_TIMESTAMP}
dockerfile: rest-api/docker/local/Dockerfile.nico-rest-api
context: rest-api
buildKit: {}
skipPush: true
nico-rest-workflow:
image: localhost:5000/nico-rest-workflow
tags:
- ${DEVSPACE_GIT_COMMIT}-${DEVSPACE_TIMESTAMP}
dockerfile: rest-api/docker/local/Dockerfile.nico-rest-workflow
context: rest-api
buildKit: {}
skipPush: true
nico-rest-site-manager:
image: localhost:5000/nico-rest-site-manager
tags:
- ${DEVSPACE_GIT_COMMIT}-${DEVSPACE_TIMESTAMP}
dockerfile: rest-api/docker/local/Dockerfile.nico-rest-site-manager
context: rest-api
buildKit: {}
skipPush: true
nico-rest-site-agent:
image: localhost:5000/nico-rest-site-agent
tags:
- ${DEVSPACE_GIT_COMMIT}-${DEVSPACE_TIMESTAMP}
dockerfile: rest-api/docker/local/Dockerfile.nico-rest-site-agent
context: rest-api
buildKit: {}
skipPush: true
nico-rest-db:
image: localhost:5000/nico-rest-db
tags:
- ${DEVSPACE_GIT_COMMIT}-${DEVSPACE_TIMESTAMP}
dockerfile: rest-api/docker/local/Dockerfile.nico-rest-db
context: rest-api
buildKit: {}
skipPush: true
nico-rest-cert-manager:
image: localhost:5000/nico-rest-cert-manager
tags:
- ${DEVSPACE_GIT_COMMIT}-${DEVSPACE_TIMESTAMP}
dockerfile: rest-api/docker/local/Dockerfile.nico-rest-cert-manager
context: rest-api
buildKit: {}
skipPush: true
nico-mcp:
image: localhost:5000/nico-mcp
tags:
- ${DEVSPACE_GIT_COMMIT}-${DEVSPACE_TIMESTAMP}
dockerfile: rest-api/docker/local/Dockerfile.nico-mcp
context: rest-api
buildKit: {}
skipPush: true
deployments:
carbide-local:
namespace: ${LOCAL_DEV_NAMESPACE}
updateImageTags: false
helm:
chart:
path: ./helm
values:
global:
image:
repository: ${runtime.images.nico-api.image}
tag: ${runtime.images.nico-api.tag}
pullPolicy: IfNotPresent
certificate:
issuerRef:
kind: ${LOCAL_DEV_CERT_ISSUER_KIND}
name: ${LOCAL_DEV_CERT_ISSUER_NAME}
group: ${LOCAL_DEV_CERT_ISSUER_GROUP}
nico-bmc-proxy:
image:
repository: ${runtime.images.nico-bmc-proxy.image}
tag: ${runtime.images.nico-bmc-proxy.tag}
pullPolicy: IfNotPresent
nico-machine-a-tron:
image:
repository: ${runtime.images.machine-a-tron.image}
tag: ${runtime.images.machine-a-tron.tag}
pullPolicy: IfNotPresent
valuesFiles:
- dev/deployment/devspace/values.base.yaml
- dev/deployment/devspace/values.generated.yaml
nico-rest:
namespace: nico-rest
updateImageTags: false
helm:
chart:
path: ./helm/rest/nico-rest
values:
global:
image:
repository: localhost:5000
tag: ${runtime.images.nico-rest-api.tag}
pullPolicy: Never
imagePullSecrets: []
certificate:
issuerRef:
kind: ClusterIssuer
name: nico-rest-ca-issuer
group: cert-manager.io
nico-rest-common:
secrets:
dbCreds:
username: ${LOCAL_DEV_REST_POSTGRES_USER}
password: ${LOCAL_DEV_REST_POSTGRES_PASSWORD}
nico-rest-api:
nodePort:
enabled: true
port: 30388
config:
db:
host: postgres.postgres.svc.cluster.local
name: ${LOCAL_DEV_REST_POSTGRES_DB}
user: ${LOCAL_DEV_REST_POSTGRES_USER}
keycloak:
enabled: true
baseURL: http://keycloak:8082
externalBaseURL: http://localhost:${LOCAL_DEV_KEYCLOAK_FORWARD_PORT}
realm: nico-dev
clientID: nico-api
serviceAccount: true
nico-rest-workflow:
secrets:
dbCreds: db-creds
config:
db:
host: postgres.postgres.svc.cluster.local
name: ${LOCAL_DEV_REST_POSTGRES_DB}
user: ${LOCAL_DEV_REST_POSTGRES_USER}
nico-rest-db:
db:
host: postgres.postgres.svc.cluster.local
name: ${LOCAL_DEV_REST_POSTGRES_DB}
user: ${LOCAL_DEV_REST_POSTGRES_USER}
nico-rest-site-agent:
namespace: nico-rest
updateImageTags: false
helm:
chart:
path: ./helm/rest/nico-rest-site-agent
values:
global:
image:
repository: localhost:5000
tag: ${runtime.images.nico-rest-api.tag}
pullPolicy: Never
imagePullSecrets: []
certificate:
issuerRef:
kind: ClusterIssuer
name: nico-rest-ca-issuer
group: cert-manager.io
certificate:
uris:
- spiffe://nico.local/nico-system/sa/elektra-site-agent
envConfig:
NICO_ADDRESS: nico-api.${LOCAL_DEV_NAMESPACE}.svc.cluster.local:1079
NICO_SEC_OPT: "2"
CORE_GRPC_ADDRESS: nico-api.${LOCAL_DEV_NAMESPACE}.svc.cluster.local:1079
CORE_GRPC_SEC_OPT: "2"
FLOW_GRPC_ENABLED: "false"
CLUSTER_ID: 00000000-0000-4000-8000-000000000001
TEMPORAL_SERVER: site.server.temporal.local
TEMPORAL_SUBSCRIBE_NAMESPACE: 00000000-0000-4000-8000-000000000001
TEMPORAL_SUBSCRIBE_QUEUE: site
nico-mcp:
namespace: nico-rest
updateImageTags: false
helm:
chart:
path: ./helm/rest/nico-mcp
values:
global:
image:
repository: localhost:5000
tag: ${runtime.images.nico-rest-api.tag}
pullPolicy: Never
imagePullSecrets: []
config:
baseURL: http://nico-rest-api:8388
apiName: nico
hooks:
- name: load-images-into-local-cluster
events: ["before:deploy"]
command: |-
CONTEXT=$(kubectl config current-context 2>/dev/null || echo "")
case "$CONTEXT" in
kind-*)
echo "Loading images into kind cluster..."
kind load docker-image --name "${CONTEXT#kind-}" \
"${runtime.images.nico-api.image}:${runtime.images.nico-api.tag}" \
"${runtime.images.nico-bmc-proxy.image}:${runtime.images.nico-bmc-proxy.tag}" \
"${runtime.images.machine-a-tron.image}:${runtime.images.machine-a-tron.tag}"
;;
# Add new local K8s tools here
esac
- name: load-rest-images-into-local-cluster
events: ["before:deploy"]
command: |-
CONTEXT=$(kubectl config current-context 2>/dev/null || echo "")
case "$CONTEXT" in
kind-*)
echo "Loading REST images into kind cluster..."
kind load docker-image --name "${CONTEXT#kind-}" \
"${runtime.images.nico-rest-api.image}:${runtime.images.nico-rest-api.tag}" \
"${runtime.images.nico-rest-workflow.image}:${runtime.images.nico-rest-workflow.tag}" \
"${runtime.images.nico-rest-site-manager.image}:${runtime.images.nico-rest-site-manager.tag}" \
"${runtime.images.nico-rest-site-agent.image}:${runtime.images.nico-rest-site-agent.tag}" \
"${runtime.images.nico-rest-db.image}:${runtime.images.nico-rest-db.tag}" \
"${runtime.images.nico-rest-cert-manager.image}:${runtime.images.nico-rest-cert-manager.tag}" \
"${runtime.images.nico-mcp.image}:${runtime.images.nico-mcp.tag}"
;;
esac
- name: setup-rest-integration
events: ["after:deploy"]
command: |-
LOCAL_DEV_REST_API_FORWARD_PORT=${LOCAL_DEV_REST_API_FORWARD_PORT} \
LOCAL_DEV_KEYCLOAK_FORWARD_PORT=${LOCAL_DEV_KEYCLOAK_FORWARD_PORT} \
dev/deployment/devspace/setup-rest-integration.sh
profiles:
- name: core-only
patches:
- op: remove
path: images.nico-rest-api
- op: remove
path: images.nico-rest-workflow
- op: remove
path: images.nico-rest-site-manager
- op: remove
path: images.nico-rest-site-agent
- op: remove
path: images.nico-rest-db
- op: remove
path: images.nico-rest-cert-manager
- op: remove
path: images.nico-mcp
- op: remove
path: deployments.nico-rest
- op: remove
path: deployments.nico-rest-site-agent
- op: remove
path: deployments.nico-mcp
- op: remove
path: hooks.name=load-rest-images-into-local-cluster
- op: remove
path: hooks.name=setup-rest-integration