Skip to content
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
3 changes: 1 addition & 2 deletions api/v1alpha1/applyconfiguration/api/v1alpha1/bmcstatus.go

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

1 change: 0 additions & 1 deletion api/v1alpha1/applyconfiguration/internal/internal.go

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

10 changes: 1 addition & 9 deletions api/v1alpha1/bmc_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,7 @@ type BMCStatus struct {
// +optional
FirmwareVersion string `json:"firmwareVersion,omitempty"`

// State represents the current state of the BMC.
// kubebuilder:validation:Enum=Enabled;Error;Pending
// +kubebuilder:default=Pending
// State represents the current state of the BMC as reported by Redfish.
// +optional
State BMCState `json:"state,omitempty"`

Expand Down Expand Up @@ -232,12 +230,6 @@ type BMCState string
const (
// BMCStateEnabled indicates that the BMC is enabled and functioning correctly.
BMCStateEnabled BMCState = "Enabled"

// BMCStateError indicates that there is an error with the BMC.
BMCStateError BMCState = "Error"

// BMCStatePending indicates that there is an error connecting with the BMC.
BMCStatePending BMCState = "Pending"
)

// +kubebuilder:object:root=true
Expand Down
30 changes: 15 additions & 15 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func main() { // nolint: gocyclo
discoveryTimeout time.Duration
biosSettingsApplyTimeout time.Duration
bmcFailureResetDelay time.Duration
bmcResetResyncInterval time.Duration
bmcReconnectInterval time.Duration
bmcResetWaitingInterval time.Duration
serverMaxConcurrentReconciles int
serverClaimMaxConcurrentReconciles int
Expand Down Expand Up @@ -129,8 +129,8 @@ func main() { // nolint: gocyclo
"Defines the interval at which the server is polled.")
flag.DurationVar(&bmcFailureResetDelay, "bmc-failure-reset-delay", 0,
"Reset the BMC after this duration of consecutive failures. 0 to disable.")
flag.DurationVar(&bmcResetResyncInterval, "bmc-reset-resync-interval", 2*time.Minute,
"Defines the interval at which the bmc is polled when bmc reset is in-progress.")
flag.DurationVar(&bmcReconnectInterval, "bmc-reconnect-interval", 2*time.Minute,
"Defines the interval at which the BMC is requeued after a connection failure or while a reset is in progress.")
flag.DurationVar(&bmcResetWaitingInterval, "bmc-reset-waiting-interval", 2*time.Minute,
"Defines the duration which the bmc waits before reconciling again when bmc has been reset.")
flag.DurationVar(&maintenanceResyncInterval, "maintenance-resync-interval", 2*time.Minute,
Expand Down Expand Up @@ -425,18 +425,18 @@ func main() { // nolint: gocyclo
os.Exit(1)
}
if err = (&controller.BMCReconciler{
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
DefaultProtocol: effectiveProtocol,
SkipCertValidation: effectiveSkipCert,
BMCFailureResetDelay: bmcFailureResetDelay,
BMCResetWaitTime: bmcResetWaitingInterval,
BMCClientRetryInterval: bmcResetResyncInterval,
ManagerNamespace: managerNamespace,
EventURL: eventURL,
DNSRecordTemplate: dnsRecordTemplate,
Conditions: conditionutils.NewAccessor(conditionutils.AccessorOptions{}),
BMCOptions: bmc.Options{
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
DefaultProtocol: effectiveProtocol,
SkipCertValidation: effectiveSkipCert,
FailureResetDelay: bmcFailureResetDelay,
ResetWaitTime: bmcResetWaitingInterval,
ReconnectInterval: bmcReconnectInterval,
ManagerNamespace: managerNamespace,
EventURL: eventURL,
DNSRecordTemplate: dnsRecordTemplate,
Conditions: conditionutils.NewAccessor(conditionutils.AccessorOptions{}),
Options: bmc.Options{
BasicAuth: true,
},
}).SetupWithManager(mgr); err != nil {
Expand Down
6 changes: 2 additions & 4 deletions config/crd/bases/metal.ironcore.dev_bmcs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,8 @@ spec:
description: SKU is the stock keeping unit identifier for the BMC.
type: string
state:
default: Pending
description: |-
State represents the current state of the BMC.
kubebuilder:validation:Enum=Enabled;Error;Pending
description: State represents the current state of the BMC as reported
by Redfish.
type: string
type: object
type: object
Expand Down
6 changes: 2 additions & 4 deletions dist/chart/templates/crd/bmcs.metal.ironcore.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,8 @@ spec:
description: SKU is the stock keeping unit identifier for the BMC.
type: string
state:
default: Pending
description: |-
State represents the current state of the BMC.
kubebuilder:validation:Enum=Enabled;Error;Pending
description: State represents the current state of the BMC as reported
by Redfish.
type: string
type: object
type: object
Expand Down
6 changes: 2 additions & 4 deletions dist/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1344,10 +1344,8 @@ spec:
description: SKU is the stock keeping unit identifier for the BMC.
type: string
state:
default: Pending
description: |-
State represents the current state of the BMC.
kubebuilder:validation:Enum=Enabled;Error;Pending
description: State represents the current state of the BMC as reported
by Redfish.
type: string
type: object
type: object
Expand Down
4 changes: 1 addition & 3 deletions docs/api-reference/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -670,8 +670,6 @@ _Appears in:_
| Field | Description |
| --- | --- |
| `Enabled` | BMCStateEnabled indicates that the BMC is enabled and functioning correctly.<br /> |
| `Error` | BMCStateError indicates that there is an error with the BMC.<br /> |
| `Pending` | BMCStatePending indicates that there is an error connecting with the BMC.<br /> |


#### BMCStatus
Expand All @@ -694,7 +692,7 @@ _Appears in:_
| `sku` _string_ | SKU is the stock keeping unit identifier for the BMC. | | |
| `serialNumber` _string_ | SerialNumber is the serial number of the BMC. | | |
| `firmwareVersion` _string_ | FirmwareVersion is the version of the firmware currently running on the BMC. | | |
| `state` _[BMCState](#bmcstate)_ | State represents the current state of the BMC.<br />kubebuilder:validation:Enum=Enabled;Error;Pending | Pending | |
| `state` _[BMCState](#bmcstate)_ | State represents the current state of the BMC as reported by Redfish. | | |
| `powerState` _[BMCPowerState](#bmcpowerstate)_ | PowerState represents the current power state of the BMC. | | |
| `lastResetTime` _[Time](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.36/#time-v1-meta)_ | LastResetTime is the timestamp of the last reset operation performed on the BMC. | | |
| `metricsReportSubscriptionLink` _string_ | MetricsReportSubscriptionLink is the link to the metrics report subscription of the bmc. | | |
Expand Down
Loading
Loading