Skip to content

Commit

Permalink
machine controller (#47)
Browse files Browse the repository at this point in the history
* rebase from main

Signed-off-by: Artem Bortnikov <[email protected]>

* add inventory

Signed-off-by: Artem Bortnikov <[email protected]>

* inventory

Signed-off-by: Artem Bortnikov <[email protected]>

* sanitize condition

Signed-off-by: Artem Bortnikov <[email protected]>

* rebased to latest main

Signed-off-by: Artem Bortnikov <[email protected]>

* machine cr state transition diagram

Signed-off-by: Artem Bortnikov <[email protected]>

* rework machine state transition

Signed-off-by: Artem Bortnikov <[email protected]>

* update resource scopes and tests

Signed-off-by: Artem Bortnikov <[email protected]>

* make inventory cluster-scoped

Signed-off-by: Artem Bortnikov <[email protected]>

* update tests

Signed-off-by: Artem Bortnikov <[email protected]>

* checks

Signed-off-by: Artem Bortnikov <[email protected]>

* disable tests

Signed-off-by: Artem Bortnikov <[email protected]>

* disable oob tests

Signed-off-by: Artem Bortnikov <[email protected]>

---------

Signed-off-by: Artem Bortnikov <[email protected]>
  • Loading branch information
aobort authored Jun 12, 2024
1 parent 75328a3 commit b5b0486
Show file tree
Hide file tree
Showing 45 changed files with 6,390 additions and 334 deletions.
12 changes: 12 additions & 0 deletions PROJECT
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Code generated by tool. DO NOT EDIT.
# This file is used to track the info used to scaffold your project
# and allow the plugins properly work.
# More info: https://book.kubebuilder.io/reference/project-config.html
domain: ironcore.dev
layout:
- go.kubebuilder.io/v4
Expand Down Expand Up @@ -37,4 +41,12 @@ resources:
kind: OOBSecret
path: github.com/ironcore-dev/metal/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
controller: true
domain: ironcore.dev
group: metal
kind: Inventory
path: github.com/ironcore-dev/metal/api/v1alpha1
version: v1alpha1
version: "3"
434 changes: 434 additions & 0 deletions api/v1alpha1/inventory_types.go

Large diffs are not rendered by default.

16 changes: 14 additions & 2 deletions api/v1alpha1/machine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ type MachineSpec struct {
// +kubebuilder:validation:Enum=Lit;Off;Blinking
// +optional
LocatorLED LED `json:"locatorLED,omitempty"`

// +optional
CleanupRequired bool `json:"cleanupRequired,omitempty"`

// +optional
Maintenance bool `json:"maintenance,omitempty"`
}

type Power string
Expand Down Expand Up @@ -84,7 +90,7 @@ type MachineStatus struct {
NetworkInterfaces []MachineNetworkInterface `json:"networkInterfaces"`

// +optional
// +kubebuilder:validation:Enum=Ready;Unready;Error
// +kubebuilder:validation:Enum=Initial;Available;Reserved;Tainted;Maintenance;Error
State MachineState `json:"state,omitempty"`

// +patchStrategy=merge
Expand All @@ -111,7 +117,13 @@ type MachineState string
const (
MachineStateReady MachineState = "Ready"
MachineStateUneady MachineState = "Unready"
MachineStateError MachineState = "Error"

MachineStateInitial MachineState = "Initial"
MachineStateAvailable MachineState = "Available"
MachineStateReserved MachineState = "Reserved"
MachineStateTainted MachineState = "Tainted"
MachineStateMaintenance MachineState = "Maintenance"
MachineStateError MachineState = "Error"
)

const (
Expand Down
Loading

0 comments on commit b5b0486

Please sign in to comment.