# Functions

CreateCloneSourcePod creates our cloning src pod which will be used for out of band cloning to read the contents of the src PVC.
CreateImporterPod creates and returns a pointer to a pod which is created based on the passed-in endpoint, secret name, and pvc.
CreateScratchPersistentVolumeClaim creates and returns a pointer to a scratch PVC which is created based on the passed-in pvc and storage class name.
CreateUploadPod creates upload service pod manifest and sends to server.
CreateUploadService creates upload service service manifest and sends to server.
DecodePublicKey turns a bunch of bytes into a public key.
EnsureCDIConfigExists creates an empty CDIConfig if necessary.
GetScratchPvcStorageClass tries to determine which storage class to use for use with a scratch persistent volume claim.
GetUploadResourceName returns the name given to upload services/pods.
GetUploadServerURL returns the url the proxy should post to for a particular pvc.
IsCsiCrdsDeployed checks whether the CSI snapshotter CRD are deployed.
IsOpenshift checks if we are on OpenShift platform.
MakeCloneSourcePodSpec creates and returns the clone source pod spec based on the target pvc.
MakeEmptyCDIConfigSpec creates cdi config manifest.
MakeImporterPodSpec creates and return the importer pod spec based on the passed-in endpoint, secret and pvc.
MakePodOwnerReference makes owner reference from a Pod.
MakePVCOwnerReference makes owner reference from a PVC.
MakeUploadPodSpec creates upload service pod manifest.
MakeUploadServiceSpec creates upload service service manifest.
NewCloneController sets up a Clone Controller, and returns a pointer to to the newly created Controller.
NewConfigController creates a new ConfigController.
NewController is called when we instantiate any CDI controller.
NewDataVolumeController sets up a Data Volume Controller, and return a pointer to the newly created Controller.
NewImportController sets up an Import Controller, and returns a pointer to the newly created Import Controller.
NewSmartCloneController sets up a Smart Clone Controller, and returns a pointer to to the newly created Controller.
NewUploadController returns a new UploadController.
ParseSourcePvcAnnotation parses out the annotations for a CDI PVC, splitting the string based on the delimiter argument.
UploadPossibleForPVC is called by the api server to see whether to return an upload token.
ValidateCanCloneSourceAndTargetSpec validates the specs passed in are compatible for cloning.

# Constants

AnnAPIGroup is the APIGroup for CDI.
AnnCertConfigMap is the name of a configmap containing tls certs.
AnnCloneOf is used to indicate that cloning was complete.
AnnCloneRequest sets our expected annotation for a CloneRequest.
AnnCloneToken is the annotation containing the clone token.
AnnContentType provides a const for the PVC content-type.
AnnCreatedBy is a pod annotation indicating if the pod was created by the PVC.
AnnDefaultStorageClass is the annotation indicating that a storage class is the default one.
AnnEndpoint provides a const for our PVC endpoint annotation.
AnnImportPod provides a const for our PVC importPodName annotation.
AnnOwnerRef is used when owner is in a different namespace.
AnnPodPhase is a PVC annotation indicating the related pod progress (phase).
AnnPodReady tells whether the pod is ready.
AnnRequiresScratch provides a const for our PVC requires scratch annotation.
AnnSecret provides a const for our PVC secretName annotation.
AnnSmartCloneRequest sets our expected annotation for a CloneRequest.
AnnSource provide a const for our PVC import source annotation.
AnnUploadRequest marks that a PVC should be made available for upload.
APIServerPublicKeyDir is the path to the apiserver public key dir.
APIServerPublicKeyPath is the path to the apiserver public key.
CertVolName is the name of the volumecontaining certs.
CloneFailed provides a const to indicate clone has failed.
CloneInProgress provides a const to indicate clone is in progress.
CloneScheduled provides a const to indicate clone is scheduled.
CloneSucceeded provides a const to indicate clone has succeeded.
CloneUniqueID is used as a special label to be used when we search for the pod.
DataVolName provides a const to use for creating volumes in pod specs.
DataVolumeFailed provides a const to represent DataVolume failed status.
ErrClaimLost provides a const to indicate a claim is lost.
ErrImportFailedPVC provides a const to indicate an import to the PVC failed.
ErrIncompatiblePVC provides a const to indicate a clone is not possible due to an incompatible PVC.
ErrResourceDoesntExist provides a const to indicate a resource doesn't exist error.
ErrResourceExists provides a const to indicate a resource exists error.
ImagePathName provides a const to use for creating volumes in pod specs.
ImportFailed provides a const to indicate import has failed.
ImportInProgress provides a const to indicate an import is in progress.
ImportScheduled provides a const to indicate import is scheduled.
ImportSucceeded provides a const to indicate import has succeeded.
LabelImportPvc is a pod label used to find the import pod that was created by the relevant PVC.
MessageCloneFailed provides a const to form clone has failed message.
MessageCloneInProgress provides a const to form clone is in progress message.
MessageCloneScheduled provides a const to form clone is scheduled message.
MessageCloneSucceeded provides a const to form clone has succeeded message.
MessageErrClaimLost provides a const to form claim lost message.
MessageImportFailed provides a const to form import has failed message.
MessageImportInProgress provides a const to form import is in progress message.
MessageImportScheduled provides a const to form import is scheduled message.
MessageImportSucceeded provides a const to form import has succeeded message.
MessageResourceDoesntExist provides a const to form a resource doesn't exist error message.
MessageResourceExists provides a const to form a resource exists error message.
MessageResourceSynced provides a const to standardize a Resource Synced message.
MessageSmartCloneInProgress provides a const to form snapshot for smart-clone is in progress message.
MessageSmartClonePVCInProgress provides a const to form snapshot for smart-clone is in progress message.
MessageUploadFailed provides a const to form upload has failed message.
MessageUploadReady provides a const to form upload is ready message.
MessageUploadScheduled provides a const to form upload is scheduled message.
MessageUploadSucceeded provides a const to form upload has succeeded message.
ScratchVolName provides a const to use for creating scratch pvc volumes in pod specs.
SmartClonePVCInProgress provides a const to indicate snapshot creation for smart-clone is in progress.
SnapshotForSmartCloneCreated provides a const to indicate snapshot creation for smart-clone has been completed.
SnapshotForSmartCloneInProgress provides a const to indicate snapshot creation for smart-clone is in progress.
SourceGlance is the source type of glance.
SourceHTTP is the source type HTTP, if unspecified or invalid, it defaults to SourceHTTP.
SourceNone means there is no source.
SourceRegistry is the source type of Registry.
SourceS3 is the source type S3.
SuccessSynced provides a const to represent a Synced status.
UploadFailed provides a const to indicate upload has failed.
UploadReady provides a const to indicate upload is in progress.
UploadScheduled provides a const to indicate upload is scheduled.
UploadSucceeded provides a const to indicate upload has succeeded.

# Structs

CloneController represents the CDI Clone Controller.
ConfigController members.
Controller is a struct that contains common information and functionality used by all CDI controllers.
DataVolumeController represents the CDI Data Volume Controller.
DataVolumeEvent reoresents event.
ImportController represents a CDI Import Controller.
SmartCloneController represents the CDI SmartClone Controller.
UploadController members.