machine

package
v0.0.0-...-11ba601 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 23 Imported by: 2

Documentation

Index

Constants

View Source
const (
	ProviderName = "baremetal"
	// HostAnnotation is the key for an annotation that should go on a Machine to
	// reference what BareMetalHost it corresponds to.
	HostAnnotation = "metal3.io/BareMetalHost"
)

Variables

This section is empty.

Functions

func SelectorFromProviderSpec

func SelectorFromProviderSpec(providerspec *machinev1beta1.ProviderSpec) (labels.Selector, error)

SelectorFromProviderSpec returns a selector that can be used to determine if a BareMetalHost matches a Machine.

Types

type Actuator

type Actuator struct {
	// contains filtered or unexported fields
}

Actuator is responsible for performing machine reconciliation

func NewActuator

func NewActuator(params ActuatorParams) (*Actuator, error)

NewActuator creates a new Actuator

func (*Actuator) Create

func (a *Actuator) Create(ctx context.Context, machine *machinev1beta1.Machine) error

Create creates a machine and is invoked by the Machine Controller. This will be called (in preference to Update()) when Exists() returns false, provided that the Machine has not yet reached the Provisioned phase.

func (*Actuator) Delete

func (a *Actuator) Delete(ctx context.Context, machine *machinev1beta1.Machine) error

Delete deletes a machine and is invoked by the Machine Controller

func (*Actuator) Exists

func (a *Actuator) Exists(ctx context.Context, machine *machinev1beta1.Machine) (bool, error)

Exists tests for the existence of a machine and is invoked by the Machine Controller

func (*Actuator) GetIP

func (a *Actuator) GetIP(machine *machinev1beta1.Machine) (string, error)

GetIP returns IP address of the machine in the cluster.

func (*Actuator) GetKubeConfig

func (a *Actuator) GetKubeConfig(controlPlaneMachine *machinev1beta1.Machine) (string, error)

GetKubeConfig gets a kubeconfig from the running control plane.

func (*Actuator) Update

func (a *Actuator) Update(ctx context.Context, machine *machinev1beta1.Machine) error

Update updates a machine and is invoked by the Machine Controller This is called when Exists() returns true and the Machine has not failed or been deleted.

type ActuatorParams

type ActuatorParams struct {
	Client client.Client
}

ActuatorParams holds parameter information for Actuator

Jump to

Keyboard shortcuts

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