Created
September 1, 2018 19:07
-
-
Save j-griffith/a65e80a2bc008258efe4b2399f0cd636 to your computer and use it in GitHub Desktop.
Notes for constants moved out of common into controller
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package controller | |
import "time" | |
// General constants we use for various labels and checks | |
const ( | |
cdiLabelKey = "app" //CDI_LABEL_KEY | |
cdiLabelValue = "containerized-data-importer" //CDI_LABEL_VALUE | |
CDILabelSelector = cdiLabelKey + "=" + cdiLabelValue //CDI_LABEL_SELECTOR | |
importerPodName = "importer" //IMPORTER_PODNAME | |
importerDataDir = "/data" //IMPORTER_DATA_DIR | |
cloningLabelKey = "cloning" //CLONING_LABEL_KEY | |
cloningLabelValue = "host-assisted-cloning" //CLONING_LABEL_VALUE | |
cloningTopologyKey = "kubernetes.io/hostname" //CLONING_TOPOLOGY_KEY *check this one | |
ClonerSourcePodName = "clone-source-pod" //CLONER_SOURCE_PODNAME | |
ClonerTargetPodName = "clone-target-pod" //CLONER_TARGET_PODNAME | |
clonerImagePath = "/tmp/clone/image" // CLONER_IMAGE_PATH | |
clonerSocketPath = "/tmp/clone/socket" // CLONER_SOCKET_PATH | |
keyAccess = "accessKeyId" //KeyAccess | |
keySecret = "secretKey" //KeySecret | |
defaultResyncPeriod = 10 * time.Minute // DEFAULT_RESYNC_PERIOD | |
dataVolumeName = "cdi-data-vol" //DataVolName | |
imagePathName = "image-path" //ImagePathName | |
socketPathName = "socket-path" //SocketPathName | |
) | |
// PVC Annotation related constants | |
const ( | |
cloneRequestAnnotation = "k8s.io/CloneRequest" | |
cloneOfAnnotation = "k8s.io/CloneOf" | |
cloningCreatedByAnnotation = "cdi.kubevirt.io/storage.cloningCreatedByController" | |
clonePodPhaseAnnotation = "cdi.kubevirt.io/storage.clone.pod.phase" | |
cloneUniqeIDAnnotation = "cdi.kubevirt.io/storage.clone.cloneUniqeId" | |
targetPodNamespaceAnnotation = "cdi.kubevirt.io/storage.clone.targetPod.namespace" | |
pvcEndpointAnnotation = "cdi.kubevirt.io/storage.import/endpoint" //AnnEndppoint | |
pvcSecretAnnotation = "cdi.kubevirt.io/storage.import.import.secretName" //AnnSecret | |
pvcImportPodAnnotation = "cdi.kubevirt.io/storage.import.importPodName" //AnnImportPod | |
) | |
// Importer POD Annotations | |
const ( | |
podCreateByAnnotation = "cdi.kubevirt.io/storage.createdByController" //AnnCreatedBy | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment