Documentation ¶
Index ¶
- func DomainStateString(state libvirt.DomainState) string
- func EncodeProviderStatus(codec codec, status *providerconfigv1.LibvirtMachineProviderStatus) (*runtime.RawExtension, error)
- func NodeAddresses(dom *libvirt.Domain) ([]corev1.NodeAddress, error)
- func ProviderConfigMachine(codec codec, ms *clusterv1.MachineSpec) (*providerconfigv1.LibvirtMachineProviderConfig, error)
- func ProviderStatusFromMachine(codec codec, machine *clusterv1.Machine) (*providerconfigv1.LibvirtMachineProviderStatus, error)
- func UpdateProviderStatus(status *providerconfigv1.LibvirtMachineProviderStatus, dom *libvirt.Domain) error
- type Actuator
- func (a *Actuator) Create(context context.Context, cluster *clusterv1.Cluster, ...) error
- func (a *Actuator) Delete(context context.Context, cluster *clusterv1.Cluster, ...) error
- func (a *Actuator) Exists(context context.Context, cluster *clusterv1.Cluster, ...) (bool, error)
- func (a *Actuator) Update(context context.Context, cluster *clusterv1.Cluster, ...) error
- type ActuatorParams
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
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