Skip to content

Commit

Permalink
feat: implement bare-metal provider
Browse files Browse the repository at this point in the history
Add initial implementation of the bare-metal infra provider.

Related to siderolabs/omni#660.

Signed-off-by: Utku Ozdemir <[email protected]>
  • Loading branch information
utkuozdemir committed Nov 28, 2024
1 parent 0498eb1 commit 9b7e98c
Show file tree
Hide file tree
Showing 75 changed files with 8,911 additions and 45 deletions.
18 changes: 18 additions & 0 deletions .codecov.yml
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
48 changes: 48 additions & 0 deletions .conform.yaml
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/.
13 changes: 13 additions & 0 deletions .dockerignore
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
91 changes: 46 additions & 45 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-11-28T09:31:42Z by kres 232fe63.
# Generated on 2024-11-28T10:44:33Z by kres 232fe63.

name: default
concurrency:
Expand Down Expand Up @@ -76,55 +76,55 @@ jobs:
- name: base
run: |
make base
- name: unit-tests
run: |
make unit-tests
- name: unit-tests-race
run: |
make unit-tests-race
# - name: unit-tests
# run: |
# make unit-tests
# - name: unit-tests-race
# run: |
# make unit-tests-race
- name: provider
run: |
make provider
- name: lint
run: |
make lint
- name: Login to registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
username: ${{ github.repository_owner }}
- name: image-provider
run: |
make image-provider
- name: push-provider
if: github.event_name != 'pull_request'
env:
PLATFORM: linux/amd64,linux/arm64
PUSH: "true"
run: |
make image-provider
# - name: lint
# run: |
# make lint
# - name: Login to registry
# if: github.event_name != 'pull_request'
# uses: docker/login-action@v3
# with:
# password: ${{ secrets.GITHUB_TOKEN }}
# registry: ghcr.io
# username: ${{ github.repository_owner }}
# - name: image-provider
# run: |
# make image-provider
# - name: push-provider
# if: github.event_name != 'pull_request'
# env:
# PLATFORM: linux/amd64,linux/arm64
# PUSH: "true"
# run: |
# make image-provider
- name: qemu-up
run: |
make qemu-up
- name: Login to registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
username: ${{ github.repository_owner }}
- name: image-qemu-up
run: |
make image-qemu-up
- name: push-qemu-up
if: github.event_name != 'pull_request'
env:
PLATFORM: linux/amd64,linux/arm64
PUSH: "true"
run: |
make image-qemu-up
# - name: Login to registry
# if: github.event_name != 'pull_request'
# uses: docker/login-action@v3
# with:
# password: ${{ secrets.GITHUB_TOKEN }}
# registry: ghcr.io
# username: ${{ github.repository_owner }}
# - name: image-qemu-up
# run: |
# make image-qemu-up
# - name: push-qemu-up
# if: github.event_name != 'pull_request'
# env:
# PLATFORM: linux/amd64,linux/arm64
# PUSH: "true"
# run: |
# make image-qemu-up
- name: run-integration-test
run: |
sudo -E make run-integration-test
Expand All @@ -135,8 +135,9 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: artifacts
path: |
path: |-
_out
!_out/omni/
retention-days: "5"
- name: save-talos-logs-artifacts
if: always()
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
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
149 changes: 149 additions & 0 deletions .golangci.yml
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
Loading

0 comments on commit 9b7e98c

Please sign in to comment.