Documentation
¶
Index ¶
Constants ¶
const ( EventGetPowerStateFailed = "GetPowerStateFailed" EventSetPowerStateFailed = "SetPowerStateFailed" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BMCClient ¶
type BMCClient interface {
// Close ends the connection with the bmc.
Close(ctx context.Context) error
// GetPowerState fetches the current power status of the bmc.
GetPowerState(ctx context.Context) (string, error)
// SetPowerState power controls the bmc to the input power state.
SetPowerState(ctx context.Context, state string) (bool, error)
// SetBootDevice sets the boot device on the bmc.
// Currently this sets the first boot device.
// setPersistent, if true will set the boot device permanently. If false, sets one time boot.
// efiBoot, if true passes efiboot options while setting boot device.
SetBootDevice(ctx context.Context, bootDevice string, setPersistent, efiBoot bool) (bool, error)
}
BMCClient represents a baseboard management controller client. It defines a set of methods to connect and interact with a BMC.
type BMCClientFactoryFunc ¶
type BMCClientFactoryFunc func(ctx context.Context, hostIP, port, username, password string) (BMCClient, error)
BMCClientFactoryFunc defines a func that returns a BMCClient
func NewBMCClientFactoryFunc ¶
func NewBMCClientFactoryFunc(ctx context.Context) BMCClientFactoryFunc
NewBMCClientFactoryFunc returns a new BMCClientFactoryFunc
type JobReconciler ¶
type JobReconciler struct {
// contains filtered or unexported fields
}
JobReconciler reconciles a Job object
func NewJobReconciler ¶
func NewJobReconciler(client client.Client, logger logr.Logger) *JobReconciler
NewJobReconciler returns a new JobReconciler
func (*JobReconciler) Reconcile ¶
Reconcile runs a Job. Creates the individual Tasks on the cluster. Watches for Task and creates next Job Task based on conditions.
func (*JobReconciler) SetupWithManager ¶
SetupWithManager sets up the controller with the Manager.
type MachineReconciler ¶
type MachineReconciler struct {
// contains filtered or unexported fields
}
MachineReconciler reconciles a Machine object
func NewMachineReconciler ¶
func NewMachineReconciler(client client.Client, recorder record.EventRecorder, bmcClientFactory BMCClientFactoryFunc, logger logr.Logger) *MachineReconciler
NewMachineReconciler returns a new MachineReconciler
func (*MachineReconciler) Reconcile ¶
Reconcile ensures the state of a Machine. Gets the Machine object and uses the SecretReference to initialize a BMC Client. Updates the Power status and conditions accordingly.
func (*MachineReconciler) SetupWithManager ¶
func (r *MachineReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type TaskReconciler ¶
type TaskReconciler struct {
// contains filtered or unexported fields
}
TaskReconciler reconciles a Task object
func NewTaskReconciler ¶
func NewTaskReconciler(client client.Client, bmcClientFactory BMCClientFactoryFunc, logger logr.Logger) *TaskReconciler
NewTaskReconciler returns a new TaskReconciler
func (*TaskReconciler) Reconcile ¶
Reconcile runs a Task. Establishes a connection to the BMC. Runs the specified action in the Task.
func (*TaskReconciler) SetupWithManager ¶
func (r *TaskReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.