machineops

package
v0.1.22 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PowerClient

type PowerClient interface {
	PowerState(ctx context.Context) (redfish.PowerState, error)
	Reset(ctx context.Context, resetType redfish.ResetType) error
	DisableBootOverride(ctx context.Context) error
	SetBootOverride(ctx context.Context, target redfish.BootTarget, enabled redfish.BootEnabled) error
	GetBootConfig(ctx context.Context) (redfish.BootConfig, error)
	SetStaticIPv4(ctx context.Context, config redfish.StaticIPv4Config) error
	SetHTTPBootOverride(ctx context.Context, bootURL string) error
	SetBIOSStaticIPv4(ctx context.Context, config redfish.StaticIPv4Config) error
	SetBIOSHTTPBootURI(ctx context.Context, bootURL string) error
}

PowerClient is the Redfish power operation subset used by MachineOperation reconciliation.

type PowerClientFactory

type PowerClientFactory interface {
	ForMachine(ctx context.Context, machine *v1alpha3.Machine) (PowerClient, error)
}

PowerClientFactory builds a PowerClient for a Machine.

type Reconciler

type Reconciler struct {
	client.Client
	APIReader client.Reader

	Site                  string
	PowerClients          PowerClientFactory
	HTTPBootURL           func(*v1alpha3.Machine) (string, error)
	MaxConcurrentMachines int
	MaxAttempts           int32
	PollInterval          time.Duration
	PowerActionTimeout    time.Duration
	Now                   func() metav1.Time
}

Reconciler reconciles metalman-owned host MachineOperations.

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*Reconciler) SetupWithManager

func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error

type RedfishPowerClientFactory

type RedfishPowerClientFactory struct {
	Reader client.Reader
	Pool   *redfish.Pool
}

RedfishPowerClientFactory creates PowerClients backed by the shared Redfish pool.

func (*RedfishPowerClientFactory) ForMachine

func (f *RedfishPowerClientFactory) ForMachine(ctx context.Context, machine *v1alpha3.Machine) (PowerClient, error)

type StatusQueue added in v0.1.20

type StatusQueue struct {
	Client   client.Client
	Now      func() metav1.Time
	Log      *slog.Logger
	Capacity int
	// contains filtered or unexported fields
}

StatusQueue records server-observed status milestones. Most updates are best effort, but PXE-disable updates are synchronous because the installer only sends that completion signal once.

func (*StatusQueue) NeedLeaderElection added in v0.1.20

func (q *StatusQueue) NeedLeaderElection() bool

func (*StatusQueue) RecordBootImageWritten added in v0.1.20

func (q *StatusQueue) RecordBootImageWritten(_ context.Context, machineName string) error

func (*StatusQueue) RecordBootLoaderDownloaded added in v0.1.20

func (q *StatusQueue) RecordBootLoaderDownloaded(_ context.Context, machineName, filename string) error

func (*StatusQueue) RecordCloudInitDone added in v0.1.20

func (q *StatusQueue) RecordCloudInitDone(_ context.Context, machineName string) error

func (*StatusQueue) RecordOperationCondition added in v0.1.22

func (q *StatusQueue) RecordOperationCondition(_ context.Context, machineName string, condition metav1.Condition) error

func (*StatusQueue) RecordPXEDisabled added in v0.1.20

func (q *StatusQueue) RecordPXEDisabled(ctx context.Context, machineName, imageName string) error

func (*StatusQueue) Start added in v0.1.20

func (q *StatusQueue) Start(ctx context.Context) error

Jump to

Keyboard shortcuts

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