forked from siderolabs/omni-infra-provider-bare-metal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add initial implementation of the bare-metal infra provider. Related to siderolabs/omni#660. Signed-off-by: Utku Ozdemir <[email protected]>
- Loading branch information
1 parent
0498eb1
commit 62bc6f2
Showing
74 changed files
with
8,804 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. | ||
# | ||
# Generated on 2024-10-14T09:32:55Z by kres 34e72ac. | ||
|
||
codecov: | ||
require_ci_to_pass: false | ||
|
||
coverage: | ||
status: | ||
project: | ||
default: | ||
target: 0% | ||
threshold: 0.5% | ||
base: auto | ||
if_ci_failed: success | ||
patch: off | ||
|
||
comment: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. | ||
# | ||
# Generated on 2024-10-14T09:32:55Z by kres 34e72ac. | ||
|
||
policies: | ||
- type: commit | ||
spec: | ||
dco: true | ||
gpg: | ||
required: true | ||
identity: | ||
gitHubOrganization: siderolabs | ||
spellcheck: | ||
locale: US | ||
maximumOfOneCommit: true | ||
header: | ||
length: 89 | ||
imperative: true | ||
case: lower | ||
invalidLastCharacters: . | ||
body: | ||
required: true | ||
conventional: | ||
types: | ||
- chore | ||
- docs | ||
- perf | ||
- refactor | ||
- style | ||
- test | ||
- release | ||
scopes: | ||
- .* | ||
- type: license | ||
spec: | ||
root: . | ||
skipPaths: | ||
- .git/ | ||
- testdata/ | ||
includeSuffixes: | ||
- .go | ||
excludeSuffixes: | ||
- .pb.go | ||
- .pb.gw.go | ||
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/. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. | ||
# | ||
# Generated on 2024-10-14T09:34:03Z by kres 34e72ac. | ||
|
||
* | ||
!api | ||
!cmd | ||
!internal | ||
!go.mod | ||
!go.sum | ||
!.golangci.yml | ||
!README.md | ||
!.markdownlint.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. | ||
# | ||
# Generated on 2024-11-28T09:31:42Z by kres 232fe63. | ||
|
||
_out | ||
hack/compose/docker-compose.override.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. | ||
# | ||
# Generated on 2024-11-18T15:38:35Z by kres 91b35db. | ||
|
||
# options for analysis running | ||
run: | ||
timeout: 10m | ||
issues-exit-code: 1 | ||
tests: true | ||
build-tags: [ ] | ||
modules-download-mode: readonly | ||
|
||
# output configuration options | ||
output: | ||
formats: | ||
- format: colored-line-number | ||
path: stdout | ||
print-issued-lines: true | ||
print-linter-name: true | ||
uniq-by-line: true | ||
path-prefix: "" | ||
|
||
# all available settings of specific linters | ||
linters-settings: | ||
dogsled: | ||
max-blank-identifiers: 2 | ||
dupl: | ||
threshold: 150 | ||
errcheck: | ||
check-type-assertions: true | ||
check-blank: true | ||
exhaustive: | ||
default-signifies-exhaustive: false | ||
gci: | ||
sections: | ||
- standard # Standard section: captures all standard packages. | ||
- default # Default section: contains all imports that could not be matched to another section type. | ||
- localmodule # Imports from the same module. | ||
gocognit: | ||
min-complexity: 30 | ||
nestif: | ||
min-complexity: 5 | ||
goconst: | ||
min-len: 3 | ||
min-occurrences: 3 | ||
gocritic: | ||
disabled-checks: [ ] | ||
gocyclo: | ||
min-complexity: 20 | ||
godot: | ||
scope: declarations | ||
gofmt: | ||
simplify: true | ||
gomodguard: { } | ||
govet: | ||
enable-all: true | ||
lll: | ||
line-length: 200 | ||
tab-width: 4 | ||
misspell: | ||
locale: US | ||
ignore-words: [ ] | ||
nakedret: | ||
max-func-lines: 30 | ||
prealloc: | ||
simple: true | ||
range-loops: true # Report preallocation suggestions on range loops, true by default | ||
for-loops: false # Report preallocation suggestions on for loops, false by default | ||
nolintlint: | ||
allow-unused: false | ||
allow-no-explanation: [ ] | ||
require-explanation: false | ||
require-specific: true | ||
rowserrcheck: { } | ||
testpackage: { } | ||
unparam: | ||
check-exported: false | ||
unused: | ||
local-variables-are-used: false | ||
whitespace: | ||
multi-if: false # Enforces newlines (or comments) after every multi-line if statement | ||
multi-func: false # Enforces newlines (or comments) after every multi-line function signature | ||
wsl: | ||
strict-append: true | ||
allow-assign-and-call: true | ||
allow-multiline-assign: true | ||
allow-cuddle-declarations: false | ||
allow-trailing-comment: false | ||
force-case-trailing-whitespace: 0 | ||
force-err-cuddling: false | ||
allow-separated-leading-comment: false | ||
gofumpt: | ||
extra-rules: false | ||
cyclop: | ||
# the maximal code complexity to report | ||
max-complexity: 20 | ||
depguard: | ||
rules: | ||
prevent_unmaintained_packages: | ||
list-mode: lax # allow unless explicitly denied | ||
files: | ||
- $all | ||
deny: | ||
- pkg: io/ioutil | ||
desc: "replaced by io and os packages since Go 1.16: https://tip.golang.org/doc/go1.16#ioutil" | ||
|
||
linters: | ||
enable-all: true | ||
disable-all: false | ||
fast: false | ||
disable: | ||
- exhaustruct | ||
- err113 | ||
- forbidigo | ||
- funlen | ||
- gochecknoglobals | ||
- gochecknoinits | ||
- godox | ||
- gomoddirectives | ||
- gosec | ||
- inamedparam | ||
- ireturn | ||
- mnd | ||
- nestif | ||
- nonamedreturns | ||
- paralleltest | ||
- tagalign | ||
- tagliatelle | ||
- thelper | ||
- varnamelen | ||
- wrapcheck | ||
- testifylint # complains about our assert recorder and has a number of false positives for assert.Greater(t, thing, 1) | ||
- protogetter # complains about us using Value field on typed spec, instead of GetValue which has a different signature | ||
- perfsprint # complains about us using fmt.Sprintf in non-performance critical code, updating just kres took too long | ||
- goimports # same as gci | ||
- musttag # seems to be broken - goes into imported libraries and reports issues there | ||
|
||
issues: | ||
exclude: [ ] | ||
exclude-rules: [ ] | ||
exclude-use-default: false | ||
exclude-case-sensitive: false | ||
max-issues-per-linter: 10 | ||
max-same-issues: 3 | ||
new: false | ||
|
||
severity: | ||
default-severity: error | ||
case-sensitive: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
--- | ||
kind: common.Build | ||
spec: | ||
ignoredPaths: | ||
- hack/compose/docker-compose.override.yml | ||
--- | ||
kind: common.Image | ||
name: image-metal-agent | ||
spec: | ||
pushLatest: false | ||
extraEnvironment: | ||
PLATFORM: linux/amd64,linux/arm64 | ||
--- | ||
kind: common.Image | ||
name: image-qemu-up | ||
spec: | ||
baseImage: ghcr.io/siderolabs/talosctl:v1.9.0-alpha.3 | ||
pushLatest: false | ||
extraEnvironment: | ||
PLATFORM: linux/amd64,linux/arm64 | ||
--- | ||
kind: custom.Step | ||
name: ipxe | ||
spec: | ||
docker: | ||
enabled: true | ||
stages: | ||
- name: ipxe-linux-amd64 | ||
from: ghcr.io/siderolabs/ipxe:v1.8.0-16-g71d23b4 | ||
platform: linux/amd64 | ||
- name: ipxe-linux-arm64 | ||
from: ghcr.io/siderolabs/ipxe:v1.8.0-16-g71d23b4 | ||
platform: linux/arm64 | ||
--- | ||
kind: auto.CustomSteps | ||
spec: | ||
steps: | ||
- name: ipxe | ||
toplevel: true | ||
- name: run-integration-test | ||
toplevel: true | ||
--- | ||
kind: common.Image | ||
name: image-provider | ||
spec: | ||
pushLatest: false | ||
extraEnvironment: | ||
PLATFORM: linux/amd64,linux/arm64 | ||
copyFrom: | ||
- stage: ghcr.io/siderolabs/musl:v1.8.0-16-g71d23b4 # required by zbin | ||
source: / | ||
destination: / | ||
- stage: ghcr.io/siderolabs/liblzma:v1.8.0-16-g71d23b4 # required by zbin | ||
source: / | ||
destination: / | ||
- stage: ghcr.io/siderolabs/openssl:v1.8.0-16-g71d23b4 # required by ipmitool | ||
source: / | ||
destination: / | ||
- stage: ghcr.io/siderolabs/ipmitool:v1.8.0-16-g71d23b4 | ||
source: / | ||
destination: / | ||
- stage: ghcr.io/siderolabs/ipxe:v1.8.0-16-g71d23b4 | ||
source: /usr/libexec/zbin | ||
destination: /bin/zbin | ||
- stage: ipxe-linux-amd64 | ||
source: /usr/libexec/ | ||
destination: /var/lib/ipxe/amd64 | ||
- stage: ipxe-linux-arm64 | ||
source: /usr/libexec/ | ||
destination: /var/lib/ipxe/arm64 | ||
- | ||
stage: ghcr.io/siderolabs/talos-metal-agent-boot-assets:v1.9.0-alpha.3-agent-v0.1.0-alpha.2 # to be used with --use-local-boot-assets for local development | ||
# stage: 127.0.0.1:5005/siderolabs/talos-metal-agent-boot-assets:v0.0.1-local # for local development, to be replaced with the line above and rekres-ed | ||
source: / | ||
destination: /assets | ||
--- | ||
kind: golang.Build | ||
spec: | ||
outputs: | ||
linux-amd64: | ||
GOOS: linux | ||
GOARCH: amd64 | ||
linux-arm64: | ||
GOOS: linux | ||
GOARCH: arm64 | ||
--- | ||
kind: golang.Generate | ||
spec: | ||
versionPackagePath: internal/version | ||
baseSpecPath: /api | ||
vtProtobufEnabled: true | ||
specs: | ||
- source: api/provider/provider.proto | ||
subdirectory: provider | ||
- source: api/specs/specs.proto | ||
subdirectory: specs | ||
--- | ||
kind: service.CodeCov | ||
spec: | ||
enabled: false | ||
--- | ||
kind: custom.Step | ||
name: run-integration-test | ||
spec: | ||
sudoInCI: true | ||
makefile: | ||
enabled: true | ||
depends: | ||
- provider | ||
- qemu-up | ||
script: | ||
- >- | ||
@hack/test/integration.sh | ||
ghaction: | ||
enabled: true | ||
sops: true | ||
artifacts: | ||
enabled: true | ||
additional: | ||
- name: talos-logs | ||
always: true | ||
continueOnError: true | ||
paths: | ||
- "~/.talos/clusters/**/*.log" | ||
- "!~/.talos/clusters/**/swtpm.log" | ||
--- | ||
kind: common.SOPS | ||
spec: | ||
enabled: true | ||
config: |- | ||
creation_rules: | ||
- age: age1xrpa9ujxxcj2u2gzfrzv8mxak4rts94a6y60ypurv6rs5cpr4e4sg95f0k | ||
# order: Andrey, Noel, Artem, Utku, Dmitriy | ||
pgp: >- | ||
15D5721F5F5BAF121495363EFE042E3D4085A811, | ||
CC51116A94490FA6FB3C18EB2401FCAE863A06CA, | ||
4919F560F0D35F80CF382D76E084A2DF1143C14D, | ||
11177A43C6E3752E682AC690DBD13117B0A14E93, | ||
AA5213AF261C1977AF38B03A94B473337258BFD5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// 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/. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. | ||
# | ||
# Generated on 2024-10-14T09:32:55Z by kres 34e72ac. | ||
|
||
{ | ||
"MD013": false, | ||
"MD033": false, | ||
"default": true | ||
} |
Oops, something went wrong.