# Packages
* This file is part of the KubeVirt project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
# Functions
GetControllerOf returns the controllerRef if controllee has a controller, otherwise returns nil.
IsPodReady treats the pod as ready to be handed over to virt-handler, as soon as all pods except the compute pod are ready.
NewControllerExpectations returns a store for ControllerExpectations.
NewListWatchFromClient creates a new ListWatch from the specified client, resource, kubevirtNamespace and field selector.
NewUIDTrackingControllerExpectations returns a wrapper around ControllerExpectations that is aware of deleteKeys.
NewVirtualMachineControllerRefManager returns a VirtualMachineControllerRefManager that exposes methods to manage the controllerRef of virtual machines.
RecheckDeletionTimestamp returns a CanAdopt() function to recheck deletion.
VolumeSnapshotClassInformer returns an informer for VolumeSnapshotClasses.
VolumeSnapshotInformer returns an informer for VolumeSnapshots.
# Constants
BackendStorageNotReadyReason is added when the backend storage PVC is pending.
BurstReplicas is the maximum amount of requests in a row for CRUD operations on resources by controllers, to avoid unintentional DoS.
ErrImagePullReason is set when an error has occured while pulling an image for a containerDisk VM volume.
If a watch drops a delete event for a pod, it'll take this long before a dormant controller waiting for those packets is woken up anyway.
FailedAbortMigrationReason is added when an attempt to abort migration fails.
FailedBackendStorageCreateReason is added when the creation of the backend storage PVC fails.
FailedBackendStorageProbeReason is added when probing the backend storage PVC fails.
FailedCreatePodReason is added in an event and in a vmi controller condition when a pod for a vmi controller failed to be created.
FailedDataVolumeImportReason is added in an event when a dynamically generated dataVolume reaches the failed status phase.
FailedDeletePodReason is added in an event and in a vmi controller condition when a pod for a vmi controller failed to be deleted.
FailedGatherhingClusterTopologyHints is added if the cluster topology hints can't be collected for a VMI by virt-controller.
FailedGuaranteePodResourcesReason is added in an event and in a vmi controller condition when a pod has been created without a Guaranteed resources.
FailedHandOverPodReason is added in an event and in a vmi controller condition when transferring the pod ownership from the controller to virt-hander fails.
FailedHotplugSyncReason is set when a hotplug specific failure occurs during sync.
FailedMigrationReason is added when a migration attempt fails.
FailedPodPatchReason is set when a pod patch error occurs during sync.
FailedPvcNotFoundReason is added in an event when a PVC for a volume was not found.
ImagePullBackOffReason is set when an error has occured while pulling an image for a containerDisk VM volume, and that kubelet is backing off before retrying.
MigrationBackoffReason is set when an error has occured while migrating and virt-controller is backing off before retrying.
MigrationTargetPodUnschedulable is added a migration target pod enters Unschedulable phase.
MissingAttachmentPodReason is set when we have a hotplugged volume, but the attachment pod is missing.
NoSuitableNodesForHostModelMigration is set when a VMI with host-model CPU mode tries to migrate but no node is suitable for migration (since CPU model / required features are not supported).
TODO: replace the assignment to expression that accepts only kubev1.ManagedByLabelOperatorValue after few releases (after 0.47)
The new assignment is to avoid error on update
(operator can't recognize components with the old managed-by label's value)
*/.
PVCNotReadyReason is set when the PVC is not ready to be hot plugged.
SuccessfulAbortMigrationReason is added when an attempt to abort migration completes successfully.
SuccessfulCreatePodReason is added in an event when a pod for a vmi controller is successfully created.
SuccessfulDeletePodReason is added in an event when a pod for a vmi controller is successfully deleted.
SuccessfulHandOverPodReason is added in an event when the pod ownership transfer from the controller to virt-hander succeeds.
SuccessfulMigrationReason is added when a migration attempt completes successfully.
# Variables
ExpKeyFunc to parse out the key from a ControlleeExpectation.
UIDSetKeyFunc to parse out the key from a UIDSet.
# Structs
ControlleeExpectations track controllee creates/deletes.
ControllerExpectations is a cache mapping controllers to what they expect to see before being woken up for a sync.
UIDSet holds a key and a set of UIDs.
UIDTrackingControllerExpectations tracks the UID of the pods it deletes.
# Interfaces
ControllerExpectationsInterface is an interface that allows users to set and wait on expectations.
Expectations are either fulfilled, or expire naturally.