-
Notifications
You must be signed in to change notification settings - Fork 36
/
.kres.yaml
608 lines (602 loc) · 18.1 KB
/
.kres.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
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
---
kind: auto.CommandConfig
name: omnictl
spec:
disableImage: true
---
kind: auto.CommandConfig
name: acompat
spec:
disableImage: true
---
kind: common.GHWorkflow
spec:
customRunners:
- self-hosted
- omni
---
kind: auto.CustomSteps
spec:
steps:
- name: dev-server
toplevel: true
- name: docker-compose-up
toplevel: true
- name: docker-compose-down
toplevel: true
- name: mkcert-install
toplevel: true
- name: mkcert-generate
toplevel: true
- name: mkcert-uninstall
toplevel: true
- name: run-integration-test
toplevel: true
---
kind: custom.Step
name: dev-server
spec:
makefile:
enabled: true
phony: true
script:
- hack/dev-server.sh
---
kind: custom.Step
name: docker-compose-up
spec:
makefile:
enabled: true
phony: true
script:
- >-
ARTIFACTS="$(ARTIFACTS)"
SHA="$(SHA)"
TAG="$(TAG)"
USERNAME="$(USERNAME)"
REGISTRY="$(REGISTRY)"
JS_TOOLCHAIN="$(JS_TOOLCHAIN)"
PROTOBUF_TS_VERSION="$(PROTOBUF_TS_VERSION)"
PROTOBUF_GRPC_GATEWAY_TS_VERSION="$(PROTOBUF_GRPC_GATEWAY_TS_VERSION)"
NODE_BUILD_ARGS="$(NODE_BUILD_ARGS)"
TOOLCHAIN="$(TOOLCHAIN)"
CGO_ENABLED="$(CGO_ENABLED)"
GO_BUILDFLAGS="$(GO_BUILDFLAGS)"
GOLANGCILINT_VERSION="$(GOLANGCILINT_VERSION)"
GOFUMPT_VERSION="$(GOFUMPT_VERSION)"
GOIMPORTS_VERSION="$(GOIMPORTS_VERSION)"
PROTOBUF_GO_VERSION="$(PROTOBUF_GO_VERSION)"
GRPC_GO_VERSION="$(GRPC_GO_VERSION)"
GRPC_GATEWAY_VERSION="$(GRPC_GATEWAY_VERSION)"
VTPROTOBUF_VERSION="$(VTPROTOBUF_VERSION)"
DEEPCOPY_VERSION="$(DEEPCOPY_VERSION)"
TESTPKGS="$(TESTPKGS)"
COMPOSE_DOCKER_CLI_BUILD=1
DOCKER_BUILDKIT=1
GO_LDFLAGS="$(GO_LDFLAGS)"
docker compose --file ./hack/compose/docker-compose.yml --file ./hack/compose/docker-compose.override.yml up --build
---
kind: custom.Step
name: mkcert-generate
spec:
makefile:
enabled: true
phony: true
script:
- >-
go run ./hack/generate-certs -config ./hack/generate-certs.yml generate
---
kind: custom.Step
name: mkcert-install
spec:
makefile:
enabled: true
phony: true
script:
- >-
go run ./hack/generate-certs install
---
kind: custom.Step
name: mkcert-uninstall
spec:
makefile:
enabled: true
phony: true
script:
- >-
go run ./hack/generate-certs uninstall
---
kind: custom.Step
name: docker-compose-down
spec:
makefile:
enabled: true
phony: true
variables:
- name: REMOVE_VOLUMES
defaultValue: false
script:
- >-
ARTIFACTS="$(ARTIFACTS)"
SHA="$(SHA)"
TAG="$(TAG)"
USERNAME="$(USERNAME)"
REGISTRY="$(REGISTRY)"
JS_TOOLCHAIN="$(JS_TOOLCHAIN)"
PROTOBUF_TS_VERSION="$(PROTOBUF_TS_VERSION)"
PROTOBUF_GRPC_GATEWAY_TS_VERSION="$(PROTOBUF_GRPC_GATEWAY_TS_VERSION)"
NODE_BUILD_ARGS="$(NODE_BUILD_ARGS)"
TOOLCHAIN="$(TOOLCHAIN)"
CGO_ENABLED="$(CGO_ENABLED)"
GO_BUILDFLAGS="$(GO_BUILDFLAGS)"
GOLANGCILINT_VERSION="$(GOLANGCILINT_VERSION)"
GOFUMPT_VERSION="$(GOFUMPT_VERSION)"
GOIMPORTS_VERSION="$(GOIMPORTS_VERSION)"
PROTOBUF_GO_VERSION="$(PROTOBUF_GO_VERSION)"
GRPC_GO_VERSION="$(GRPC_GO_VERSION)"
GRPC_GATEWAY_VERSION="$(GRPC_GATEWAY_VERSION)"
VTPROTOBUF_VERSION="$(VTPROTOBUF_VERSION)"
DEEPCOPY_VERSION="$(DEEPCOPY_VERSION)"
TESTPKGS="$(TESTPKGS)"
COMPOSE_DOCKER_CLI_BUILD=1
DOCKER_BUILDKIT=1
GO_LDFLAGS="$(GO_LDFLAGS)"
docker compose --file ./hack/compose/docker-compose.yml --file ./hack/compose/docker-compose.override.yml down --rmi local --remove-orphans --volumes=$(REMOVE_VOLUMES)
---
kind: custom.Step
name: run-integration-test
spec:
sudoInCI: true
makefile:
enabled: true
depends:
- integration-test-linux-amd64
- omnictl-linux-amd64
- omni-linux-amd64
script:
- >-
@hack/test/integration.sh
ghaction:
enabled: true
sops: true
artifacts:
enabled: true
extraPaths:
- "!_out/etcd"
- "!_out/secondary-storage/**"
additional:
- name: talos-logs
always: true
continueOnError: true
paths:
- "~/.talos/clusters/**/*.log"
- "!~/.talos/clusters/**/swtpm.log"
environment:
WITH_DEBUG: "true"
INTEGRATION_RUN_E2E_TEST: "true"
INTEGRATION_TEST_ARGS: "--test.run CleanState/|Auth/|DefaultCluster/"
TALEMU_TEST_ARGS: "--test.run ImmediateClusterDestruction/|EncryptedCluster/|SinglenodeCluster/|ScaleUpAndDown/|ScaleUpAndDownMachineClassBasedMachineSets/|TalosUpgrades/|KubernetesUpgrades/|MaintenanceDowngrade/|ClusterTemplate/|ScaleUpAndDownAutoProvisionMachineSets/"
RUN_TALEMU_TESTS: true
jobs:
- name: e2e-short-secureboot
crons:
- '30 1 * * *'
runnerLabels:
- omni
triggerLabels:
- integration/e2e-short-secureboot
environmentOverride:
INTEGRATION_RUN_E2E_TEST: "false"
INTEGRATION_TEST_ARGS: "--test.run CleanState/|TalosImageGeneration/|ImmediateClusterDestruction/|DefaultCluster/|EncryptedCluster/|SinglenodeCluster/|Auth/"
RUN_TALEMU_TESTS: false
ENABLE_SECUREBOOT: true
- name: e2e-short
crons:
- '30 1 * * *'
runnerLabels:
- omni
triggerLabels:
- integration/e2e
- integration/e2e-short
environmentOverride:
INTEGRATION_RUN_E2E_TEST: "false"
INTEGRATION_TEST_ARGS: "--test.run CleanState/|TalosImageGeneration/|ImmediateClusterDestruction/|DefaultCluster/|EncryptedCluster/|SinglenodeCluster/|Auth/"
RUN_TALEMU_TESTS: false
- name: e2e-scaling
crons:
- '30 1 * * *'
runnerLabels:
- omni
triggerLabels:
- integration/e2e
- integration/e2e-scaling
environmentOverride:
INTEGRATION_RUN_E2E_TEST: "false"
INTEGRATION_TEST_ARGS: "--test.run CleanState/|ScaleUpAndDown/|ScaleUpAndDownMachineClassBasedMachineSets/|RollingUpdateParallelism"
RUN_TALEMU_TESTS: false
- name: e2e-forced-removal
crons:
- '30 1 * * *'
runnerLabels:
- omni
triggerLabels:
- integration/e2e
- integration/e2e-forced-removal
environmentOverride:
INTEGRATION_RUN_E2E_TEST: "false"
INTEGRATION_TEST_ARGS: "--test.run CleanState/|ForcedMachineRemoval/|ReplaceControlPlanes/|ConfigPatching/|KubernetesNodeAudit/"
RUN_TALEMU_TESTS: false
- name: e2e-upgrades
crons:
- '30 1 * * *'
runnerLabels:
- omni
triggerLabels:
- integration/e2e
- integration/e2e-upgrades
environmentOverride:
INTEGRATION_RUN_E2E_TEST: "false"
INTEGRATION_TEST_ARGS: "--test.run CleanState/|TalosUpgrades/|KubernetesUpgrades/|MaintenanceDowngrade/"
RUN_TALEMU_TESTS: false
- name: e2e-templates
crons:
- '30 1 * * *'
runnerLabels:
- omni
triggerLabels:
- integration/e2e
- integration/e2e-templates
environmentOverride:
INTEGRATION_RUN_E2E_TEST: "false"
INTEGRATION_TEST_ARGS: "--test.run CleanState/|ClusterTemplate/"
RUN_TALEMU_TESTS: false
- name: e2e-backups
crons:
- '30 1 * * *'
runnerLabels:
- omni
triggerLabels:
- integration/e2e
- integration/e2e-backups
environmentOverride:
INTEGRATION_RUN_E2E_TEST: "false"
INTEGRATION_TEST_ARGS: "--test.run CleanState/|EtcdBackupAndRestore"
RUN_TALEMU_TESTS: false
- name: e2e-workload-proxy
crons:
- '30 1 * * *'
runnerLabels:
- omni
triggerLabels:
- integration/e2e
- integration/e2e-workload-proxy
environmentOverride:
INTEGRATION_RUN_E2E_TEST: "false"
INTEGRATION_TEST_ARGS: "--test.run CleanState/|WorkloadProxy"
RUN_TALEMU_TESTS: false
---
kind: common.Build
spec:
ignoredPaths:
- "hack/generate-certs.yml"
- "hack/generate-certs/ca-root"
- "hack/generate-certs/certs"
- "hack/compose/docker-compose.override.yml"
- go.work.sum
---
kind: common.SOPS
spec:
enabled: true
config: |-
creation_rules:
- age: age1xrpa9ujxxcj2u2gzfrzv8mxak4rts94a6y60ypurv6rs5cpr4e4sg95f0k
# order: Andrey, Noel, Artem, Utku, Dmitriy
pgp: >-
15D5721F5F5BAF121495363EFE042E3D4085A811,
CC51116A94490FA6FB3C18EB2401FCAE863A06CA,
4919F560F0D35F80CF382D76E084A2DF1143C14D,
966BC282A680D8BB3E8363E865933E76F0549B0D,
AA5213AF261C1977AF38B03A94B473337258BFD5
---
kind: golang.Build
name: omni
spec:
outputs:
linux-amd64:
GOOS: linux
GOARCH: amd64
linux-arm64:
GOOS: linux
GOARCH: arm64
darwin-amd64:
GOOS: darwin
GOARCH: amd64
darwin-arm64:
GOOS: darwin
GOARCH: arm64
---
kind: golang.Build
name: omnictl
spec:
outputs:
linux-amd64:
GOOS: linux
GOARCH: amd64
linux-arm64:
GOOS: linux
GOARCH: arm64
darwin-amd64:
GOOS: darwin
GOARCH: amd64
darwin-arm64:
GOOS: darwin
GOARCH: arm64
windows-amd64.exe:
GOOS: windows
GOARCH: amd64
---
kind: golang.Build
name: integration-test
spec:
outputs:
linux-amd64:
GOOS: linux
GOARCH: amd64
linux-arm64:
GOOS: linux
GOARCH: arm64
---
kind: golang.Generate
spec:
versionPackagePath: internal/version
licenseText: |
Copyright (c) 2024 Sidero Labs, Inc.
Use of this software is governed by the Business Source License
included in the LICENSE file.
---
kind: golang.Generate
spec:
baseSpecPath: /client/api
goGenerateSpecs:
- source: ./internal
copy:
- frontend/
vtProtobufEnabled: true
specs:
- source: client/api/common/omni.proto
subdirectory: common
- source: client/api/omni/resources/resources.proto
subdirectory: omni/resources
genGateway: true
- source: client/api/omni/management/management.proto
subdirectory: omni/management
genGateway: true
- source: client/api/omni/oidc/oidc.proto
subdirectory: omni/oidc
genGateway: true
- source: client/api/omni/specs/auth.proto
subdirectory: omni/specs
genGateway: true
- source: client/api/omni/specs/infra.proto
subdirectory: omni/specs
genGateway: true
- source: client/api/omni/specs/virtual.proto
subdirectory: omni/specs
genGateway: true
- source: client/api/omni/specs/ephemeral.proto
subdirectory: omni/specs
genGateway: true
- source: client/api/omni/specs/oidc.proto # not used in the frontend
subdirectory: omni/specs
genGateway: true
- source: client/api/omni/specs/omni.proto
subdirectory: omni/specs
genGateway: true
- source: client/api/omni/specs/siderolink.proto
subdirectory: omni/specs
genGateway: true
- source: client/api/omni/specs/system.proto
subdirectory: omni/specs
genGateway: true
- source: https://raw.githubusercontent.com/googleapis/googleapis/master/google/rpc/status.proto
subdirectory: google/rpc/
genGateway: true
- source: https://raw.githubusercontent.com/siderolabs/talos/3c8f51d707b897fb34ed3a9f7c32b7cd3e5ee5b0/api/common/common.proto
subdirectory: common/
genGateway: true
- source: https://raw.githubusercontent.com/siderolabs/talos/3c8f51d707b897fb34ed3a9f7c32b7cd3e5ee5b0/api/machine/machine.proto
subdirectory: talos/machine/
genGateway: true
- source: https://raw.githubusercontent.com/cosi-project/specification/c644a4b0fd408ec41bd29193bcdbd1a5b7feead2/proto/v1alpha1/resource.proto
subdirectory: v1alpha1
genGateway: true
---
kind: golang.GolangciLint
spec:
depguardExtraRules:
prevent_sync_errgroup:
list-mode: lax
files:
- $all
- "!$test"
- "!**/integration-test/**"
- "!**/omnictl/**"
- "!**/panichandler/**"
deny:
- pkg: golang.org/x/sync/errgroup
desc: Use github.com/siderolabs/omni/client/pkg/panichandler.ErrGroup instead
---
kind: js.Build
spec:
licenseText: |
Copyright (c) 2024 Sidero Labs, Inc.
Use of this software is governed by the Business Source License
included in the LICENSE file.
---
kind: js.Protobuf
spec:
baseSpecPath: /client/api
files:
- source: https://www.talos.dev/v1.9/schemas/config.schema.json
destination: frontend/src/schemas/config.schema.json
destinationRoot: src/api
specs:
- source: client/api/common/omni.proto
subdirectory: common
genGateway: true
- source: client/api/omni/resources/resources.proto
subdirectory: omni/resources
genGateway: true
- source: client/api/omni/management/management.proto
subdirectory: omni/management
genGateway: true
- source: client/api/omni/oidc/oidc.proto
subdirectory: omni/oidc
genGateway: true
- source: https://raw.githubusercontent.com/siderolabs/go-api-signature/a034e9ff315ba4a56115acc7ad0fb99d0dc77800/api/auth/auth.proto
subdirectory: omni/auth
genGateway: true
- source: client/api/omni/specs/omni.proto
subdirectory: omni/specs
genGateway: true
- source: client/api/omni/specs/siderolink.proto
subdirectory: omni/specs
genGateway: true
- source: client/api/omni/specs/system.proto
subdirectory: omni/specs
genGateway: true
- source: client/api/omni/specs/auth.proto
subdirectory: omni/specs
genGateway: true
- source: client/api/omni/specs/infra.proto
subdirectory: omni/specs
genGateway: true
- source: client/api/omni/specs/virtual.proto
subdirectory: omni/specs
genGateway: true
- source: client/api/omni/specs/ephemeral.proto
subdirectory: omni/specs
genGateway: true
- source: https://raw.githubusercontent.com/googleapis/googleapis/master/google/rpc/status.proto
subdirectory: google/rpc/
genGateway: true
- source: https://raw.githubusercontent.com/siderolabs/talos/03a20da9da5916c63015d355f4b56823778e994f/api/machine/machine.proto
subdirectory: talos/machine
genGateway: true
- source: https://raw.githubusercontent.com/protocolbuffers/protobuf/master/src/google/protobuf/any.proto
subdirectory: google/protobuf/
genGateway: true
- source: https://raw.githubusercontent.com/protocolbuffers/protobuf/master/src/google/protobuf/duration.proto
subdirectory: google/protobuf/
genGateway: true
- source: https://raw.githubusercontent.com/protocolbuffers/protobuf/master/src/google/protobuf/empty.proto
subdirectory: google/protobuf/
genGateway: true
- source: https://raw.githubusercontent.com/protocolbuffers/protobuf/master/src/google/protobuf/timestamp.proto
subdirectory: google/protobuf/
genGateway: true
- source: https://raw.githubusercontent.com/googleapis/googleapis/master/google/rpc/code.proto
subdirectory: google/rpc/
genGateway: true
- source: https://raw.githubusercontent.com/siderolabs/talos/03a20da9da5916c63015d355f4b56823778e994f/api/common/common.proto
subdirectory: common/
genGateway: true
- source: https://raw.githubusercontent.com/cosi-project/specification/5c734257bfa6a3acb01417809797dbfbe0e73c71/proto/v1alpha1/resource.proto
subdirectory: v1alpha1
genGateway: true
---
kind: common.Release
name: release
spec:
artifacts:
- omnictl-*
- omni-*
---
kind: common.Image
name: image-integration-test
spec:
extraEnvironment:
PLATFORM: linux/amd64,linux/arm64
imageName: "omni-integration-test"
---
kind: common.Image
name: image-omni
spec:
extraEnvironment:
PLATFORM: linux/amd64,linux/arm64
copyFrom:
- stage: omnictl-all
destination: /omnictl/
---
kind: service.CodeCov
spec:
enabled: true
targetThreshold: 15
---
kind: common.Repository
spec:
licenses:
- id: BSL-1.1
params:
Licensor: Sidero Labs, Inc.
LicensedWork: Omni
Copyright: (c) 2024 Sidero Labs, Inc.
ChangeDate: "2028-11-06"
ChangeLicense: Mozilla Public License, version 2.0
EnterpriseLink: https://www.siderolabs.com/contact/
header: |
// Copyright (c) 2024 Sidero Labs, Inc.
//
// Use of this software is governed by the Business Source License
// included in the LICENSE file.
- id: MPL-2.0
root: client
header: |
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
licenseChecks:
- root: "."
header: |
// Copyright (c) 2024 Sidero Labs, Inc.
//
// Use of this software is governed by the Business Source License
// included in the LICENSE file.
includeSuffixes:
- .go
- .ts
- .js
excludeSuffixes:
- .pb.go
- .pb.gw.go
- .pb.ts
- babel.config.js
skipPaths:
- .git
- testdata/
- client/
- frontend/node_modules/
- internal/pkg/kubernetes/resource/ # contains a file copied from kubectl
- root: client
header: |
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/
- root: frontend/
header: |
<!--
Copyright (c) 2024 Sidero Labs, Inc.
Use of this software is governed by the Business Source License
included in the LICENSE file.
-->
includeSuffixes:
- .vue
skipPaths:
- node_modules/
enforceContexts:
- e2e-short
- e2e-scaling
- e2e-templates
- e2e-upgrades
- e2e-backups
- e2e-forced-removal