controllers

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2025 License: MPL-2.0 Imports: 30 Imported by: 0

Documentation

Overview

Package controllers implements COSI controllers for the bare metal provider.

Index

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

type AgentConnectionEvent struct {
	MachineID resource.ID
	Connected bool
}

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

MapInput implements the controller.QController interface.

func (*MachineStatusController) Reconcile

Reconcile implements the controller.QController interface.

func (*MachineStatusController) Settings

func (ctrl *MachineStatusController) Settings() controller.QSettings

Settings implements the controller.QController interface.

type PXEBootEvent

type PXEBootEvent struct {
	MachineID resource.ID
	Mode      specs.BootMode
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL