Documentation ¶
Index ¶
- Constants
- func AddInstancetypeNameAnnotations(vm *virtv1.VirtualMachine, target metav1.Object)
- func AddPreferenceNameAnnotations(vm *virtv1.VirtualMachine, target metav1.Object)
- func ApplyDevicePreferences(preferenceSpec *instancetypev1beta1.VirtualMachinePreferenceSpec, ...)
- func CompareRevisions(revisionA *appsv1.ControllerRevision, revisionB *appsv1.ControllerRevision, ...) (bool, error)
- func CreateControllerRevision(vm *virtv1.VirtualMachine, object runtime.Object) (*appsv1.ControllerRevision, error)
- func GenerateRevisionNamePatch(instancetypeRevision, preferenceRevision *appsv1.ControllerRevision) ([]byte, error)
- func GetRevisionName(vmName, resourceName string, resourceUID types.UID, resourceGeneration int64) string
- type Conflicts
- type InstancetypeMethods
- func (m *InstancetypeMethods) ApplyToVmi(field *k8sfield.Path, ...) Conflicts
- func (m *InstancetypeMethods) CheckPreferenceRequirements(instancetypeSpec *instancetypev1beta1.VirtualMachineInstancetypeSpec, ...) (*k8sfield.Path, error)
- func (m *InstancetypeMethods) FindInstancetypeSpec(vm *virtv1.VirtualMachine) (*instancetypev1beta1.VirtualMachineInstancetypeSpec, error)
- func (m *InstancetypeMethods) FindPreferenceSpec(vm *virtv1.VirtualMachine) (*instancetypev1beta1.VirtualMachinePreferenceSpec, error)
- func (m *InstancetypeMethods) InferDefaultInstancetype(vm *virtv1.VirtualMachine) (*virtv1.InstancetypeMatcher, error)
- func (m *InstancetypeMethods) InferDefaultPreference(vm *virtv1.VirtualMachine) (*virtv1.PreferenceMatcher, error)
- func (m *InstancetypeMethods) StoreControllerRevisions(vm *virtv1.VirtualMachine) error
- type Methods
Constants ¶
View Source
const ( InsufficientInstanceTypeCPUResourcesErrorFmt = "insufficient CPU resources of %d vCPU provided by instance type, preference requires %d vCPU" InsufficientVMCPUResourcesErrorFmt = "insufficient CPU resources of %d vCPU provided by VirtualMachine, preference requires %d vCPU provided as %s" InsufficientInstanceTypeMemoryResourcesErrorFmt = "insufficient Memory resources of %s provided by instance type, preference requires %s" InsufficientVMMemoryResourcesErrorFmt = "insufficient Memory resources of %s provided by VirtualMachine, preference requires %s" NoVMCPUResourcesDefinedErrorFmt = "no CPU resources provided by VirtualMachine, preference requires %d vCPU" )
Variables ¶
This section is empty.
Functions ¶
func AddInstancetypeNameAnnotations ¶
func AddInstancetypeNameAnnotations(vm *virtv1.VirtualMachine, target metav1.Object)
func AddPreferenceNameAnnotations ¶
func AddPreferenceNameAnnotations(vm *virtv1.VirtualMachine, target metav1.Object)
func ApplyDevicePreferences ¶ added in v0.57.0
func ApplyDevicePreferences(preferenceSpec *instancetypev1beta1.VirtualMachinePreferenceSpec, vmiSpec *virtv1.VirtualMachineInstanceSpec)
func CompareRevisions ¶ added in v0.59.0
func CompareRevisions(revisionA *appsv1.ControllerRevision, revisionB *appsv1.ControllerRevision, isPreference bool) (bool, error)
func CreateControllerRevision ¶ added in v0.58.0
func CreateControllerRevision(vm *virtv1.VirtualMachine, object runtime.Object) (*appsv1.ControllerRevision, error)
func GenerateRevisionNamePatch ¶
func GenerateRevisionNamePatch(instancetypeRevision, preferenceRevision *appsv1.ControllerRevision) ([]byte, error)
Types ¶
type InstancetypeMethods ¶ added in v1.0.0
type InstancetypeMethods struct { InstancetypeStore cache.Store ClusterInstancetypeStore cache.Store PreferenceStore cache.Store ClusterPreferenceStore cache.Store ControllerRevisionStore cache.Store Clientset kubecli.KubevirtClient }
func (*InstancetypeMethods) ApplyToVmi ¶ added in v1.0.0
func (m *InstancetypeMethods) ApplyToVmi(field *k8sfield.Path, instancetypeSpec *instancetypev1beta1.VirtualMachineInstancetypeSpec, preferenceSpec *instancetypev1beta1.VirtualMachinePreferenceSpec, vmiSpec *virtv1.VirtualMachineInstanceSpec) Conflicts
func (*InstancetypeMethods) CheckPreferenceRequirements ¶ added in v1.0.0
func (m *InstancetypeMethods) CheckPreferenceRequirements(instancetypeSpec *instancetypev1beta1.VirtualMachineInstancetypeSpec, preferenceSpec *instancetypev1beta1.VirtualMachinePreferenceSpec, vmiSpec *virtv1.VirtualMachineInstanceSpec) (*k8sfield.Path, error)
func (*InstancetypeMethods) FindInstancetypeSpec ¶ added in v1.0.0
func (m *InstancetypeMethods) FindInstancetypeSpec(vm *virtv1.VirtualMachine) (*instancetypev1beta1.VirtualMachineInstancetypeSpec, error)
func (*InstancetypeMethods) FindPreferenceSpec ¶ added in v1.0.0
func (m *InstancetypeMethods) FindPreferenceSpec(vm *virtv1.VirtualMachine) (*instancetypev1beta1.VirtualMachinePreferenceSpec, error)
func (*InstancetypeMethods) InferDefaultInstancetype ¶ added in v1.0.0
func (m *InstancetypeMethods) InferDefaultInstancetype(vm *virtv1.VirtualMachine) (*virtv1.InstancetypeMatcher, error)
func (*InstancetypeMethods) InferDefaultPreference ¶ added in v1.0.0
func (m *InstancetypeMethods) InferDefaultPreference(vm *virtv1.VirtualMachine) (*virtv1.PreferenceMatcher, error)
func (*InstancetypeMethods) StoreControllerRevisions ¶ added in v1.0.0
func (m *InstancetypeMethods) StoreControllerRevisions(vm *virtv1.VirtualMachine) error
type Methods ¶
type Methods interface { FindInstancetypeSpec(vm *virtv1.VirtualMachine) (*instancetypev1beta1.VirtualMachineInstancetypeSpec, error) ApplyToVmi(field *k8sfield.Path, instancetypespec *instancetypev1beta1.VirtualMachineInstancetypeSpec, prefernceSpec *instancetypev1beta1.VirtualMachinePreferenceSpec, vmiSpec *virtv1.VirtualMachineInstanceSpec) Conflicts FindPreferenceSpec(vm *virtv1.VirtualMachine) (*instancetypev1beta1.VirtualMachinePreferenceSpec, error) StoreControllerRevisions(vm *virtv1.VirtualMachine) error InferDefaultInstancetype(vm *virtv1.VirtualMachine) (*virtv1.InstancetypeMatcher, error) InferDefaultPreference(vm *virtv1.VirtualMachine) (*virtv1.PreferenceMatcher, error) CheckPreferenceRequirements(instancetypeSpec *instancetypev1beta1.VirtualMachineInstancetypeSpec, preferenceSpec *instancetypev1beta1.VirtualMachinePreferenceSpec, vmiSpec *virtv1.VirtualMachineInstanceSpec) (*k8sfield.Path, error) }
Click to show internal directories.
Click to hide internal directories.