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

Add support for inline BMC access in Server reconciler #84

Merged
merged 2 commits into from
Jul 16, 2024
Merged
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
6 changes: 6 additions & 0 deletions api/v1alpha1/bmc_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

const (
BMCType = "bmc"
ProtocolRedfish = "Redfish"
ProtocolRedfishLocal = "RedfishLocal"
)

// BMCSpec defines the desired state of BMC
type BMCSpec struct {
// EndpointRef is a reference to the Kubernetes object that contains the endpoint information for the BMC.
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/zz_generated.deepcopy.go

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

45 changes: 40 additions & 5 deletions config/crd/bases/metal.ironcore.dev_bmcs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ spec:
properties:
bmcSecretRef:
description: |-
LocalObjectReference contains enough information to let you locate the
referenced object inside the same namespace.
BMCSecretRef is a reference to the Kubernetes Secret object that contains the credentials
required to access the BMC. This secret includes sensitive information such as usernames and passwords.
properties:
name:
default: ""
Expand All @@ -89,10 +89,19 @@ spec:
type: object
x-kubernetes-map-type: atomic
consoleProtocol:
description: |-
ConsoleProtocol specifies the protocol to be used for console access to the BMC.
This field is optional and can be omitted if console access is not required.
properties:
name:
description: |-
Name specifies the name of the console protocol.
This could be a protocol such as "SSH", "Telnet", etc.
type: string
port:
description: |-
Port specifies the port number used for console access.
This port is used by the specified console protocol to establish connections.
format: int32
type: integer
required:
Expand All @@ -101,8 +110,8 @@ spec:
type: object
endpointRef:
description: |-
LocalObjectReference contains enough information to let you locate the
referenced object inside the same namespace.
EndpointRef is a reference to the Kubernetes object that contains the endpoint information for the BMC.
This reference is typically used to locate the BMC endpoint within the cluster.
properties:
name:
default: ""
Expand All @@ -118,10 +127,19 @@ spec:
type: object
x-kubernetes-map-type: atomic
protocol:
description: |-
Protocol specifies the protocol to be used for communicating with the BMC.
It could be a standard protocol such as IPMI or Redfish.
properties:
name:
description: |-
Name specifies the name of the protocol.
This could be a protocol such as "IPMI", "Redfish", etc.
type: string
port:
description: |-
Port specifies the port number used for communication.
This port is used by the specified protocol to establish connections.
format: int32
type: integer
required:
Expand All @@ -134,9 +152,11 @@ spec:
- protocol
type: object
status:
description: BMCStatus defines the observed state of BMC
description: BMCStatus defines the observed state of BMC.
properties:
conditions:
description: Conditions represents the latest available observations
of the BMC's current state.
items:
description: "Condition contains details for one aspect of the current
state of this API Resource.\n---\nThis struct is intended for
Expand Down Expand Up @@ -206,23 +226,38 @@ spec:
type: object
type: array
firmwareVersion:
description: FirmwareVersion is the version of the firmware currently
running on the BMC.
type: string
ip:
description: |-
IP is the IP address of the BMC.
The type is specified as string and is schemaless.
type: string
macAddress:
description: |-
MACAddress is the MAC address of the BMC.
The format is validated using a regular expression pattern.
pattern: ^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$
type: string
manufacturer:
description: Manufacturer is the name of the BMC manufacturer.
type: string
model:
description: Model is the model number or name of the BMC.
type: string
powerState:
description: PowerState represents the current power state of the
BMC.
type: string
serialNumber:
description: SerialNumber is the serial number of the BMC.
type: string
sku:
description: SKU is the stock keeping unit identifier for the BMC.
type: string
state:
description: State represents the current state of the BMC.
type: string
type: object
type: object
Expand Down
17 changes: 10 additions & 7 deletions config/crd/bases/metal.ironcore.dev_serverbootconfigurations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ spec:
type: object
spec:
description: ServerBootConfigurationSpec defines the desired state of
ServerBootConfiguration
ServerBootConfiguration.
properties:
ignitionSecretRef:
description: |-
LocalObjectReference contains enough information to let you locate the
referenced object inside the same namespace.
IgnitionSecretRef is a reference to the Kubernetes Secret object that contains
the ignition configuration for the server. This field is optional and can be omitted if not specified.
properties:
name:
default: ""
Expand All @@ -76,11 +76,13 @@ spec:
type: object
x-kubernetes-map-type: atomic
image:
description: |-
Image specifies the boot image to be used for the server.
This field is optional and can be omitted if not specified.
type: string
serverRef:
description: |-
LocalObjectReference contains enough information to let you locate the
referenced object inside the same namespace.
description: ServerRef is a reference to the server for which this
boot configuration is intended.
properties:
name:
default: ""
Expand All @@ -100,9 +102,10 @@ spec:
type: object
status:
description: ServerBootConfigurationStatus defines the observed state
of ServerBootConfiguration
of ServerBootConfiguration.
properties:
state:
description: State represents the current state of the boot configuration.
type: string
type: object
type: object
Expand Down
20 changes: 11 additions & 9 deletions config/crd/bases/metal.ironcore.dev_serverclaims.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ spec:
metadata:
type: object
spec:
description: ServerClaimSpec defines the desired state of ServerClaim
description: ServerClaimSpec defines the desired state of ServerClaim.
properties:
ignitionSecretRef:
description: |-
LocalObjectReference contains enough information to let you locate the
referenced object inside the same namespace.
IgnitionSecretRef is a reference to the Kubernetes Secret object that contains
the ignition configuration for the server. This field is optional and can be omitted if not specified.
properties:
name:
default: ""
Expand All @@ -74,13 +74,15 @@ spec:
type: object
x-kubernetes-map-type: atomic
image:
description: Image specifies the boot image to be used for the server.
type: string
power:
description: Power specifies the desired power state of the server.
type: string
serverRef:
description: |-
LocalObjectReference contains enough information to let you locate the
referenced object inside the same namespace.
ServerRef is a reference to a specific server to be claimed.
This field is optional and can be omitted if the server is to be selected using ServerSelector.
properties:
name:
default: ""
Expand All @@ -97,9 +99,8 @@ spec:
x-kubernetes-map-type: atomic
serverSelector:
description: |-
A label selector is a label query over a set of resources. The result of matchLabels and
matchExpressions are ANDed. An empty label selector matches all objects. A null
label selector matches no objects.
ServerSelector specifies a label selector to identify the server to be claimed.
This field is optional and can be omitted if a specific server is referenced using ServerRef.
properties:
matchExpressions:
description: matchExpressions is a list of label selector requirements.
Expand Down Expand Up @@ -149,9 +150,10 @@ spec:
- power
type: object
status:
description: ServerClaimStatus defines the observed state of ServerClaim
description: ServerClaimStatus defines the observed state of ServerClaim.
properties:
phase:
description: Phase represents the current phase of the server claim.
type: string
type: object
type: object
Expand Down
Loading