machine

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DomainStateString added in v0.2.0

func DomainStateString(state libvirt.DomainState) string

DomainStateString returns a human-readable string for the given libvirt domain state.

func EncodeProviderStatus added in v0.2.0

func EncodeProviderStatus(codec codec, status *providerconfigv1.LibvirtMachineProviderStatus) (*runtime.RawExtension, error)

EncodeProviderStatus encodes a libvirt provider status as a runtime.RawExtension for inclusion in a MachineStatus object.

func NodeAddresses added in v0.2.0

func NodeAddresses(dom *libvirt.Domain) ([]corev1.NodeAddress, error)

NodeAddresses returns a slice of corev1.NodeAddress objects for a given libvirt domain.

func ProviderConfigMachine added in v0.2.0

func ProviderConfigMachine(codec codec, ms *clusterv1.MachineSpec) (*providerconfigv1.LibvirtMachineProviderConfig, error)

ProviderConfigMachine gets the machine provider config MachineSetSpec from the specified cluster-api MachineSpec.

func ProviderStatusFromMachine

func ProviderStatusFromMachine(codec codec, machine *clusterv1.Machine) (*providerconfigv1.LibvirtMachineProviderStatus, error)

ProviderStatusFromMachine deserializes a libvirt provider status from a machine object.

func UpdateProviderStatus

func UpdateProviderStatus(status *providerconfigv1.LibvirtMachineProviderStatus, dom *libvirt.Domain) error

UpdateProviderStatus updates the provider status in-place with info from the given libvirt domain.

Types

type Actuator

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

Actuator is responsible for performing machine reconciliation

var MachineActuator *Actuator

func NewActuator

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

NewActuator creates a new Actuator

func (*Actuator) Create

func (a *Actuator) Create(context context.Context, cluster *clusterv1.Cluster, machine *clusterv1.Machine) error

Create creates a machine and is invoked by the Machine Controller

func (*Actuator) Delete

func (a *Actuator) Delete(context context.Context, cluster *clusterv1.Cluster, machine *clusterv1.Machine) error

Delete deletes a machine and is invoked by the Machine Controller

func (*Actuator) Exists

func (a *Actuator) Exists(context context.Context, cluster *clusterv1.Cluster, machine *clusterv1.Machine) (bool, error)

Exists test for the existance of a machine and is invoked by the Machine Controller

func (*Actuator) Update

func (a *Actuator) Update(context context.Context, cluster *clusterv1.Cluster, machine *clusterv1.Machine) error

Update updates a machine and is invoked by the Machine Controller

type ActuatorParams

type ActuatorParams struct {
	ClusterClient clusterclient.Interface
	KubeClient    kubernetes.Interface
	ClientBuilder libvirtclient.LibvirtClientBuilderFuncType
	Codec         codec
	EventRecorder record.EventRecorder
}

ActuatorParams holds parameter information for Actuator

Jump to

Keyboard shortcuts

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