Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove BIOS settings #210

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 20 additions & 25 deletions api/v1alpha1/server_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,6 @@ type BootOrder struct {
Device string `json:"device"`
}

// BIOSSettings represents the BIOS settings for a server.
type BIOSSettings struct {
// Version specifies the version of the server BIOS for which the settings are defined.
Version string `json:"version"`
// Settings is a map of key-value pairs representing the BIOS settings.
Settings map[string]string `json:"settings,omitempty"`
}

// ServerSpec defines the desired state of a Server.
type ServerSpec struct {
// UUID is the unique identifier for the server.
Expand Down Expand Up @@ -108,8 +100,10 @@ type ServerSpec struct {

// BootOrder specifies the boot order of the server.
BootOrder []BootOrder `json:"bootOrder,omitempty"`
// BIOS specifies the BIOS settings for the server.
BIOS []BIOSSettings `json:"BIOS,omitempty"`

// BIOSSettingsRef is a reference to a ServerBIOS object that specifies
// the BIOS configuration for this server.
BIOSSettingsRef v1.LocalObjectReference `json:"biosSettingsRef,omitempty"`
}

// ServerState defines the possible states of a server.
Expand All @@ -128,6 +122,9 @@ const (
// ServerStateReserved indicates that the server is reserved for a specific use or user.
ServerStateReserved ServerState = "Reserved"

// ServerStateMaintenance indicates that the server is in maintenance mode.
ServerStateMaintenance ServerState = "Maintenance"

// ServerStateError indicates that there is an error with the server.
ServerStateError ServerState = "Error"
)
Expand Down Expand Up @@ -193,8 +190,6 @@ type ServerStatus struct {
// Storages is a list of storages associated with the server.
Storages []Storage `json:"storages,omitempty"`

BIOS BIOSSettings `json:"BIOS,omitempty"`

// Conditions represents the latest available observations of the server's current state.
// +patchStrategy=merge
// +patchMergeKey=type
Expand Down Expand Up @@ -261,18 +256,18 @@ type Storage struct {
Drives []StorageDrive `json:"drives,omitempty"`
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:resource:scope=Cluster
//+kubebuilder:printcolumn:name="UUID",type=string,JSONPath=`.spec.uuid`
//+kubebuilder:printcolumn:name="Manufacturer",type=string,JSONPath=`.status.manufacturer`
//+kubebuilder:printcolumn:name="Model",type=string,JSONPath=`.status.model`
//+kubebuilder:printcolumn:name="SKU",type=string,JSONPath=`.status.sku`,priority=100
//+kubebuilder:printcolumn:name="SerialNumber",type=string,JSONPath=`.status.serialNumber`,priority=100
//+kubebuilder:printcolumn:name="PowerState",type=string,JSONPath=`.status.powerState`
//+kubebuilder:printcolumn:name="IndicatorLED",type=string,JSONPath=`.status.indicatorLED`,priority=100
//+kubebuilder:printcolumn:name="State",type=string,JSONPath=`.status.state`
//+kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Cluster
// +kubebuilder:printcolumn:name="UUID",type=string,JSONPath=`.spec.uuid`
// +kubebuilder:printcolumn:name="Manufacturer",type=string,JSONPath=`.status.manufacturer`
// +kubebuilder:printcolumn:name="Model",type=string,JSONPath=`.status.model`
// +kubebuilder:printcolumn:name="SKU",type=string,JSONPath=`.status.sku`,priority=100
// +kubebuilder:printcolumn:name="SerialNumber",type=string,JSONPath=`.status.serialNumber`,priority=100
// +kubebuilder:printcolumn:name="PowerState",type=string,JSONPath=`.status.powerState`
// +kubebuilder:printcolumn:name="IndicatorLED",type=string,JSONPath=`.status.indicatorLED`,priority=100
// +kubebuilder:printcolumn:name="State",type=string,JSONPath=`.status.state`
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`

// Server is the Schema for the servers API
type Server struct {
Expand All @@ -283,7 +278,7 @@ type Server struct {
Status ServerStatus `json:"status,omitempty"`
}

//+kubebuilder:object:root=true
// +kubebuilder:object:root=true

// ServerList contains a list of Server
type ServerList struct {
Expand Down
33 changes: 2 additions & 31 deletions api/v1alpha1/zz_generated.deepcopy.go

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

51 changes: 16 additions & 35 deletions config/crd/bases/metal.ironcore.dev_servers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,25 +70,22 @@ spec:
spec:
description: ServerSpec defines the desired state of a Server.
properties:
BIOS:
description: BIOS specifies the BIOS settings for the server.
items:
description: BIOSSettings represents the BIOS settings for a server.
properties:
settings:
additionalProperties:
type: string
description: Settings is a map of key-value pairs representing
the BIOS settings.
type: object
version:
description: Version specifies the version of the server BIOS
for which the settings are defined.
type: string
required:
- version
type: object
type: array
biosSettingsRef:
description: |-
BIOSSettingsRef is a reference to a ServerBIOS object that specifies
the BIOS configuration for this server.
properties:
name:
default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
type: string
type: object
x-kubernetes-map-type: atomic
bmc:
description: |-
BMC contains the access details for the BMC.
Expand Down Expand Up @@ -285,22 +282,6 @@ spec:
status:
description: ServerStatus defines the observed state of Server.
properties:
BIOS:
description: BIOSSettings represents the BIOS settings for a server.
properties:
settings:
additionalProperties:
type: string
description: Settings is a map of key-value pairs representing
the BIOS settings.
type: object
version:
description: Version specifies the version of the server BIOS
for which the settings are defined.
type: string
required:
- version
type: object
conditions:
description: Conditions represents the latest available observations
of the server's current state.
Expand Down
73 changes: 13 additions & 60 deletions docs/api-reference/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,46 +10,6 @@
</div>
Resource Types:
<ul></ul>
<h3 id="metal.ironcore.dev/v1alpha1.BIOSSettings">BIOSSettings
</h3>
<p>
(<em>Appears on:</em><a href="#metal.ironcore.dev/v1alpha1.ServerSpec">ServerSpec</a>, <a href="#metal.ironcore.dev/v1alpha1.ServerStatus">ServerStatus</a>)
</p>
<div>
<p>BIOSSettings represents the BIOS settings for a server.</p>
</div>
<table>
<thead>
<tr>
<th>Field</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code>version</code><br/>
<em>
string
</em>
</td>
<td>
<p>Version specifies the version of the server BIOS for which the settings are defined.</p>
</td>
</tr>
<tr>
<td>
<code>settings</code><br/>
<em>
map[string]string
</em>
</td>
<td>
<p>Settings is a map of key-value pairs representing the BIOS settings.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="metal.ironcore.dev/v1alpha1.BMC">BMC
</h3>
<div>
Expand Down Expand Up @@ -1328,15 +1288,16 @@ if no boot configuration is specified.</p>
</tr>
<tr>
<td>
<code>BIOS</code><br/>
<code>biosSettingsRef</code><br/>
<em>
<a href="#metal.ironcore.dev/v1alpha1.BIOSSettings">
[]BIOSSettings
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#localobjectreference-v1-core">
Kubernetes core/v1.LocalObjectReference
</a>
</em>
</td>
<td>
<p>BIOS specifies the BIOS settings for the server.</p>
<p>BIOSSettingsRef is a reference to a ServerBIOS object that specifies
the BIOS configuration for this server.</p>
</td>
</tr>
</table>
Expand Down Expand Up @@ -1976,15 +1937,16 @@ if no boot configuration is specified.</p>
</tr>
<tr>
<td>
<code>BIOS</code><br/>
<code>biosSettingsRef</code><br/>
<em>
<a href="#metal.ironcore.dev/v1alpha1.BIOSSettings">
[]BIOSSettings
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#localobjectreference-v1-core">
Kubernetes core/v1.LocalObjectReference
</a>
</em>
</td>
<td>
<p>BIOS specifies the BIOS settings for the server.</p>
<p>BIOSSettingsRef is a reference to a ServerBIOS object that specifies
the BIOS configuration for this server.</p>
</td>
</tr>
</tbody>
Expand Down Expand Up @@ -2016,6 +1978,9 @@ if no boot configuration is specified.</p>
</tr><tr><td><p>&#34;Initial&#34;</p></td>
<td><p>ServerStateInitial indicates that the server is in its initial state.</p>
</td>
</tr><tr><td><p>&#34;Maintenance&#34;</p></td>
<td><p>ServerStateMaintenance indicates that the server is in maintenance mode.</p>
</td>
</tr><tr><td><p>&#34;Reserved&#34;</p></td>
<td><p>ServerStateReserved indicates that the server is reserved for a specific use or user.</p>
</td>
Expand Down Expand Up @@ -2161,18 +2126,6 @@ k8s.io/apimachinery/pkg/api/resource.Quantity
</tr>
<tr>
<td>
<code>BIOS</code><br/>
<em>
<a href="#metal.ironcore.dev/v1alpha1.BIOSSettings">
BIOSSettings
</a>
</em>
</td>
<td>
</td>
</tr>
<tr>
<td>
<code>conditions</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#condition-v1-meta">
Expand Down
Loading
Loading