Documentation
¶
Index ¶
- Constants
- Variables
- func ClaimedGPUsToHostDevs(machine *api.Machine) []libvirtxml.DomainHostdev
- func GetUniqueVolumeName(pluginName, backingVolumeID string) string
- func IsNotAssignedDomainErr(err error) bool
- type AttachVolume
- type DomainExecutor
- type MachineReconciler
- type MachineReconcilerOptions
- type MountVolume
- type VolumeAttacher
- type VolumeMounter
Constants ¶
View Source
const ( MachineFinalizer = "machine" ArchitectureAARCH64 = "aarch64" ArchitectureX8664 = "x86_64" )
Variables ¶
View Source
var ( ErrAttachedVolumeNotFound = errors.New("volume not found") ErrAttachedVolumeAlreadyExists = errors.New("volume already exists") )
View Source
var (
ErrMountedVolumeNotFound = errors.New("mounted volume not found")
)
View Source
var ErrNotAssignedDomain = errors.New("not assigned to domain")
Functions ¶
func ClaimedGPUsToHostDevs ¶ added in v0.3.0
func ClaimedGPUsToHostDevs(machine *api.Machine) []libvirtxml.DomainHostdev
func GetUniqueVolumeName ¶
func IsNotAssignedDomainErr ¶ added in v0.3.0
Types ¶
type AttachVolume ¶
type AttachVolume struct {
Name string
Device string
Spec providervolume.Volume
}
type DomainExecutor ¶
type DomainExecutor interface {
AttachDisk(disk *libvirtxml.DomainDisk) error
DetachDisk(disk *libvirtxml.DomainDisk) error
ResizeDisk(device string, size int64) error
ApplySecret(secret *libvirtxml.Secret, data []byte) error
DeleteSecret(secretUUID string) error
}
func NewCreateDomainExecutor ¶
func NewCreateDomainExecutor(lv *libvirt.Libvirt) DomainExecutor
func NewRunningDomainExecutor ¶
func NewRunningDomainExecutor(lv *libvirt.Libvirt, machineID string) DomainExecutor
type MachineReconciler ¶
type MachineReconciler struct {
// contains filtered or unexported fields
}
func NewMachineReconciler ¶
func NewMachineReconciler( log logr.Logger, host providerhost.LibvirtHost, machines store.Store[*api.Machine], machineEvents event.Source[*api.Machine], eventRecorder recorder.EventRecorder, opts MachineReconcilerOptions, ) (*MachineReconciler, error)
type MachineReconcilerOptions ¶
type MachineReconcilerOptions struct {
GuestCapabilities guest.Capabilities
TCMallocLibPath string
ImageCache ociutils.Cache
Raw raw.Raw
VolumePluginManager *providervolume.PluginManager
NetworkInterfacePlugin providernetworkinterface.Plugin
ResourceClaimer claim.Claimer
VolumeEvents event.Source[*api.Machine]
ResyncIntervalGarbageCollector time.Duration
EnableHugepages bool
GCVMGracefulShutdownTimeout time.Duration
VolumeCachePolicy string
}
type MountVolume ¶
type MountVolume = providerhost.MachineVolume
type VolumeAttacher ¶
type VolumeAttacher interface {
ListVolumes() ([]AttachVolume, error)
ForEachVolume(f func(*AttachVolume) bool) error
GetVolume(name string) (*AttachVolume, error)
AttachVolume(volume *AttachVolume) error
DetachVolume(name string) error
ResizeVolume(volume *AttachVolume) error
}
func NewLibvirtVolumeAttacher ¶
func NewLibvirtVolumeAttacher(domainDesc *libvirtxml.Domain, executor DomainExecutor, policy string) (VolumeAttacher, error)
type VolumeMounter ¶
type VolumeMounter interface {
PluginManager() *providervolume.PluginManager
ForEachVolume(f func(*MountVolume) bool) error
ListVolumes() ([]MountVolume, error)
GetVolume(computeVolumeName string) (*MountVolume, error)
ApplyVolume(ctx context.Context, spec *api.VolumeSpec, onDelete func(*MountVolume) error) (string, *providervolume.Volume, error)
DeleteVolume(ctx context.Context, computeVolumeName string) error
}
Click to show internal directories.
Click to hide internal directories.