Documentation ¶
Overview ¶
Package controllers implements COSI controllers for the bare metal provider.
Index ¶
- type AgentClient
- type AgentConnectionEvent
- type BMCAPIAddressReader
- type BMCClientFactory
- type BMCConfigurationController
- type InfraMachineStatusController
- type MachineStatusController
- func (ctrl *MachineStatusController) MapInput(_ context.Context, _ *zap.Logger, _ controller.QRuntime, ptr resource.Pointer) ([]resource.Pointer, error)
- func (ctrl *MachineStatusController) Reconcile(ctx context.Context, _ *zap.Logger, r controller.QRuntime, ...) error
- func (ctrl *MachineStatusController) Settings() controller.QSettings
- type PXEBootEvent
- type PowerOperationController
- type RebootStatusController
- type WipeStatusController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentClient ¶
type AgentClient interface { GetPowerManagement(ctx context.Context, id string) (*agentpb.GetPowerManagementResponse, error) SetPowerManagement(ctx context.Context, id string, req *agentpb.SetPowerManagementRequest) error WipeDisks(ctx context.Context, id string) error AllConnectedMachines() map[string]struct{} IsAccessible(ctx context.Context, machineID string) (bool, error) }
AgentClient is the interface for interacting with the Talos agent over the reverse GRPC tunnel.
type AgentConnectionEvent ¶
AgentConnectionEvent represents an agent connection/disconnection event.
type BMCAPIAddressReader ¶
type BMCAPIAddressReader interface {
ReadManagementAddress(id resource.ID, logger *zap.Logger) (string, error)
}
BMCAPIAddressReader is the interface for reading power management information from the API state directory.
type BMCClientFactory ¶
type BMCClientFactory interface {
GetClient(ctx context.Context, bmcConfiguration *resources.BMCConfiguration) (bmc.Client, error)
}
BMCClientFactory is the interface for creating BMC clients.
type BMCConfigurationController ¶
type BMCConfigurationController = qtransform.QController[*infra.Machine, *resources.BMCConfiguration]
BMCConfigurationController manages machine power management.
func NewBMCConfigurationController ¶
func NewBMCConfigurationController(agentClient AgentClient, bmcClientFactory BMCClientFactory, bmcAPIAddressReader BMCAPIAddressReader, requeueInterval time.Duration, ) *BMCConfigurationController
NewBMCConfigurationController creates a new BMCConfigurationController.
type InfraMachineStatusController ¶
type InfraMachineStatusController = qtransform.QController[*infra.Machine, *infra.MachineStatus]
InfraMachineStatusController manages InfraMachine resource lifecycle.
func NewInfraMachineStatusController ¶
func NewInfraMachineStatusController(machineLabels map[string]string) *InfraMachineStatusController
NewInfraMachineStatusController initializes InfraMachineStatusController.
type MachineStatusController ¶
type MachineStatusController struct { generic.NamedController // contains filtered or unexported fields }
MachineStatusController manages machine status.
func NewMachineStatusController ¶
func NewMachineStatusController(bmcClientFactory BMCClientFactory, agentClient AgentClient, agentConnectionEventCh <-chan AgentConnectionEvent, pxeBootEventCh <-chan PXEBootEvent, pollInterval time.Duration, ) *MachineStatusController
NewMachineStatusController creates a new MachineStatusController.
func (*MachineStatusController) MapInput ¶
func (ctrl *MachineStatusController) MapInput(_ context.Context, _ *zap.Logger, _ controller.QRuntime, ptr resource.Pointer) ([]resource.Pointer, error)
MapInput implements the controller.QController interface.
func (*MachineStatusController) Reconcile ¶
func (ctrl *MachineStatusController) Reconcile(ctx context.Context, _ *zap.Logger, r controller.QRuntime, ptr resource.Pointer) error
Reconcile implements the controller.QController interface.
func (*MachineStatusController) Settings ¶
func (ctrl *MachineStatusController) Settings() controller.QSettings
Settings implements the controller.QController interface.
type PXEBootEvent ¶
PXEBootEvent represents a PXE boot event for a machine served by the provider.
type PowerOperationController ¶
type PowerOperationController = qtransform.QController[*infra.Machine, *resources.PowerOperation]
PowerOperationController manages InfraMachine resource lifecycle.
func NewPowerOperationController ¶
func NewPowerOperationController(bmcClientFactory BMCClientFactory, minRebootInterval time.Duration) *PowerOperationController
NewPowerOperationController creates a new PowerOperationController.
type RebootStatusController ¶
type RebootStatusController = qtransform.QController[*infra.Machine, *resources.RebootStatus]
RebootStatusController manages machine power management.
func NewRebootStatusController ¶
func NewRebootStatusController(bmcClientFactory BMCClientFactory, minRebootInterval time.Duration, pxeBootMode pxe.BootMode) *RebootStatusController
NewRebootStatusController creates a new RebootStatusController.
type WipeStatusController ¶
type WipeStatusController = qtransform.QController[*infra.Machine, *resources.WipeStatus]
WipeStatusController manages machine power management.
func NewWipeStatusController ¶
func NewWipeStatusController(agentClient AgentClient) *WipeStatusController
NewWipeStatusController creates a new WipeStatusController.