Documentation ¶
Index ¶
- Constants
- func IdentifyNonMigratableVMS(vmiList []*kubevirtv1.VirtualMachineInstance) map[string][]string
- func Register(ctx context.Context, management *config.Management, _ config.Options) error
- type ControllerHandler
- func (ndc *ControllerHandler) CheckVMISchedulingRequirements(originalNode *corev1.Node, vmiList []*kubevirtv1.VirtualMachineInstance) ([]string, error)
- func (ndc *ControllerHandler) FindNonMigratableVMS(node *corev1.Node) (map[string][]string, error)
- func (ndc *ControllerHandler) OnNodeChange(_ string, node *corev1.Node) (*corev1.Node, error)
Constants ¶
const ( LastHealthyReplicaKey = "LastHealthyReplica" ContainerDiskOrCDRomKey = "CDRomOrContainerDiskPresent" NodeSchedulingRequirementsNotMetKey = "NodeSchedulingRequirementsNotMet" )
Variables ¶
This section is empty.
Functions ¶
func IdentifyNonMigratableVMS ¶ added in v1.3.2
func IdentifyNonMigratableVMS(vmiList []*kubevirtv1.VirtualMachineInstance) map[string][]string
IdentifyNonMigratableVMS finds VMI's with kubevirtv1.VirtualMachineInstanceIsMigratable condition set to false
Types ¶
type ControllerHandler ¶
type ControllerHandler struct {
// contains filtered or unexported fields
}
ControllerHandler to drain nodes. the controller checks if node has any replicas which may be the only working replica for a VM and attempts to shutdown the VM before the drain is initiated. This ensures that no data is lost when the instance-managers are terminated as part of the drain process
func ActionHelper ¶
func ActionHelper(nodeCache ctlcorev1.NodeCache, virtualMachineInstanceCache ctlkubevirtv1.VirtualMachineInstanceCache, longhornVolumeCache ctllhv1.VolumeCache, longhornReplicaCache ctllhv1.ReplicaCache) *ControllerHandler
func (*ControllerHandler) CheckVMISchedulingRequirements ¶ added in v1.3.2
func (ndc *ControllerHandler) CheckVMISchedulingRequirements(originalNode *corev1.Node, vmiList []*kubevirtv1.VirtualMachineInstance) ([]string, error)
CheckVMISchedulingRequirements checks if the VMI can be scheduled on another node the function will check additional nodes that * are able to satisfy the NodeSelectors terms specified in RequiredDuringSchedulingIgnoredDuringExecution * and node is ready
func (*ControllerHandler) FindNonMigratableVMS ¶ added in v1.3.2
FindNonMigratableVMS is called by action handler to leverage caches to find unhealthy VM's impacted by the migration
func (*ControllerHandler) OnNodeChange ¶
OnNodeChange handles reconcile logic for node drains