Skip to content

Commit

Permalink
feat: add resources and controllers for bare metal infra provider
Browse files Browse the repository at this point in the history
Introduce the concept of "static" infra providers, e.g., bare-metal infra provider, which manage a static set of machines contrary to the "regular" infra providers.

Add the following resources:

- `infra.Machine`: similar to `MachineRequest`, lives in the `infra-provider` namespace, serving as the input of the owning static provider. It is created in the `MachineController` if there is a SideroLink connection with the static provider ID. Regular flow of `Machine` creation is blocked, until this `infra.Machine` is accepted.

- `infra.MachineStatus`: similar to `MachineRequestStatus`, lives in the `infra-provider` namespace, serving as the output of the owning static provider. Its lifecycle must be bound to the corresponding `infra.Machine`.

- `infra.MachineState`: a resource that is supposed to be shared by Omni and bare-metal provider bi-directionally - they both can read from and write to it. It is currently used to mark the machine as installed when we observe an installation (through `SequenceEvent`s in the event sink), and to mark it as non-installed after we wipe it in the provider.

- `omni.InfraMachineConfig`: a user-managed resource to mark the `infra.Machine`s as accepted or set their desired power state. The acceptance information is then propagated to the `infra.Machine` resource. A machine which was already accepted cannot be unaccepted (checked by a validation), and this resource can only be removed when the `siderolink.Link` for the matching infra machine is removed.

Signed-off-by: Utku Ozdemir <[email protected]>
  • Loading branch information
utkuozdemir committed Nov 26, 2024
1 parent 033e051 commit 5a26d4c
Show file tree
Hide file tree
Showing 59 changed files with 4,078 additions and 2,513 deletions.
4 changes: 2 additions & 2 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-10-30T17:18:04Z by kres 6d3cad4.
# Generated on 2024-11-25T13:10:36Z by kres b9ed228.

name: default
concurrency:
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
run: |
make unit-tests-race
- name: coverage
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
files: _out/coverage-unit-tests-client.txt,_out/coverage-unit-tests.txt
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/slack-notify.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-10-30T17:18:04Z by kres 6d3cad4.
# Generated on 2024-11-25T13:10:36Z by kres b9ed228.

name: slack-notify
"on":
Expand Down Expand Up @@ -32,7 +32,7 @@ jobs:
run: |
echo pull_request_number=$(gh pr view -R ${{ github.repository }} ${{ github.event.workflow_run.head_repository.owner.login }}:${{ github.event.workflow_run.head_branch }} --json number --jq .number) >> $GITHUB_OUTPUT
- name: Slack Notify
uses: slackapi/slack-github-action@v1
uses: slackapi/slack-github-action@v2
with:
channel-id: proj-talos-maintainers
payload: |
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-11-21T22:07:50Z by kres a8af16d.
# Generated on 2024-11-25T13:10:36Z by kres b9ed228.

ARG JS_TOOLCHAIN
ARG TOOLCHAIN
Expand All @@ -20,9 +20,9 @@ ENV GOPATH=/go
ENV PATH=${PATH}:/usr/local/go/bin

# runs markdownlint
FROM docker.io/oven/bun:1.1.34-alpine AS lint-markdown
FROM docker.io/oven/bun:1.1.36-alpine AS lint-markdown
WORKDIR /src
RUN bun i markdownlint-cli@0.42.0 [email protected]
RUN bun i markdownlint-cli@0.43.0 [email protected]
COPY .markdownlint.json .
COPY ./docs ./docs
COPY ./CHANGELOG.md ./CHANGELOG.md
Expand Down
8 changes: 4 additions & 4 deletions Makefile
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-21T22:34:08Z by kres b3b0da76.
# Generated on 2024-11-25T13:10:36Z by kres b9ed228.

# common variables

Expand All @@ -20,9 +20,9 @@ REGISTRY_AND_USERNAME ?= $(REGISTRY)/$(USERNAME)
PROTOBUF_GRPC_GATEWAY_TS_VERSION ?= 1.2.1
TESTPKGS ?= ./...
JS_BUILD_ARGS ?=
PROTOBUF_GO_VERSION ?= 1.35.1
PROTOBUF_GO_VERSION ?= 1.35.2
GRPC_GO_VERSION ?= 1.5.1
GRPC_GATEWAY_VERSION ?= 2.23.0
GRPC_GATEWAY_VERSION ?= 2.24.0
VTPROTOBUF_VERSION ?= 0.6.0
GOIMPORTS_VERSION ?= 0.27.0
DEEPCOPY_VERSION ?= v0.5.6
Expand Down Expand Up @@ -74,7 +74,7 @@ COMMON_ARGS += --build-arg=DEEPCOPY_VERSION="$(DEEPCOPY_VERSION)"
COMMON_ARGS += --build-arg=GOLANGCILINT_VERSION="$(GOLANGCILINT_VERSION)"
COMMON_ARGS += --build-arg=GOFUMPT_VERSION="$(GOFUMPT_VERSION)"
COMMON_ARGS += --build-arg=TESTPKGS="$(TESTPKGS)"
JS_TOOLCHAIN ?= docker.io/oven/bun:1.1.34-alpine
JS_TOOLCHAIN ?= docker.io/oven/bun:1.1.36-alpine
TOOLCHAIN ?= docker.io/golang:1.23-alpine

# extra variables
Expand Down
2 changes: 1 addition & 1 deletion client/api/common/omni.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/api/omni/management/management.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5a26d4c

Please sign in to comment.