Documentation ¶
Index ¶
- Constants
- func ArchiveFiles(targetFile, tgtDir string, sourceFilesNames ...string) (string, error)
- func ClearInsecureRegistry(client kubernetes.Interface) error
- func CopyConfigMap(client kubernetes.Interface, ...) (string, error)
- func CopyFileHostCertConfigMap(client kubernetes.Interface, destNamespace string) (string, error)
- func CopyRegistryCertConfigMap(client kubernetes.Interface, destNamespace string) (string, error)
- func CreateCertForTestService(...) error
- func CreateDataVolumeFromDefinition(clientSet *cdiclientset.Clientset, namespace string, def *cdiv1.DataVolume) (*cdiv1.DataVolume, error)
- func CreateExecutorPodWithPVC(clientSet *kubernetes.Clientset, podName, namespace string, ...) (*k8sv1.Pod, error)
- func CreatePVCFromDefinition(clientSet *kubernetes.Clientset, namespace string, ...) (*k8sv1.PersistentVolumeClaim, error)
- func CreatePVFromDefinition(clientSet *kubernetes.Clientset, def *k8sv1.PersistentVolume) (*k8sv1.PersistentVolume, error)
- func CreatePod(clientSet *kubernetes.Clientset, namespace string, podDef *k8sv1.Pod) (*k8sv1.Pod, error)
- func CreateSecretFromDefinition(c *kubernetes.Clientset, secret *v1.Secret) (*v1.Secret, error)
- func CreateStorageClassFromDefinition(clientSet *kubernetes.Clientset, def *storageV1.StorageClass) (*storageV1.StorageClass, error)
- func DeleteDataVolume(clientSet *cdiclientset.Clientset, namespace, name string) error
- func DeletePV(clientSet *kubernetes.Clientset, pv *k8sv1.PersistentVolume) error
- func DeletePVC(clientSet *kubernetes.Clientset, namespace string, ...) error
- func DeletePod(clientSet *kubernetes.Clientset, pod *k8sv1.Pod, namespace string) error
- func DeleteSecret(clientSet *kubernetes.Clientset, namespace string, secret v1.Secret) error
- func DeleteStorageClass(clientSet *kubernetes.Clientset, storageClass *storageV1.StorageClass) error
- func FindPVC(clientSet *kubernetes.Clientset, namespace, pvcName string) (*k8sv1.PersistentVolumeClaim, error)
- func FindPodByPrefix(clientSet *kubernetes.Clientset, namespace, prefix, labelSelector string) (*k8sv1.Pod, error)
- func FormatTestData(srcFile, tgtDir string, targetFormats ...string) (string, error)
- func GetServiceInNamespace(c *kubernetes.Clientset, ns, name string) (*v1.Service, error)
- func GetServiceInNamespaceOrDie(c *kubernetes.Clientset, ns, name string) *v1.Service
- func GetServiceNodePortByName(svc *v1.Service, name string) (int, error)
- func GetServicePortByName(svc *v1.Service, name string) (int, error)
- func GetServicesInNamespaceByLabel(c *kubernetes.Clientset, ns, labelSelector string) (*v1.ServiceList, error)
- func IsExpectedNode(clientSet *kubernetes.Clientset, nodeName, podName, namespace string, ...) error
- func NewBlockPVCDefinition(pvcName string, size string, annotations, labels map[string]string, ...) *k8sv1.PersistentVolumeClaim
- func NewBlockPVDefinition(pvName string, size string, labels map[string]string, storageClassName string, ...) *k8sv1.PersistentVolume
- func NewCloningDataVolume(dataVolumeName string, size string, sourcePvc *k8sv1.PersistentVolumeClaim) *cdiv1.DataVolume
- func NewDataVolumeCloneToBlockPV(dataVolumeName string, size string, ...) *cdiv1.DataVolume
- func NewDataVolumeForBlankRawImage(dataVolumeName, size string) *cdiv1.DataVolume
- func NewDataVolumeForImageCloning(dataVolumeName, size string, namespace, pvcName string) *cdiv1.DataVolume
- func NewDataVolumeForUpload(dataVolumeName string, size string) *cdiv1.DataVolume
- func NewDataVolumeWithHTTPImport(dataVolumeName string, size string, httpURL string) *cdiv1.DataVolume
- func NewDataVolumeWithHTTPImportToBlockPV(dataVolumeName string, size string, httpURL string) *cdiv1.DataVolume
- func NewDataVolumeWithRegistryImport(dataVolumeName string, size string, registryURL string) *cdiv1.DataVolume
- func NewPVCDefinition(pvcName string, size string, annotations, labels map[string]string) *k8sv1.PersistentVolumeClaim
- func NewPVCDefinitionWithSelector(pvcName, size string, selector map[string]string, ...) *k8sv1.PersistentVolumeClaim
- func NewPVDefinition(pvName string, size string, labels map[string]string, storageClassName string) *k8sv1.PersistentVolume
- func NewPodWithPVC(podName, cmd string, pvc *k8sv1.PersistentVolumeClaim) *k8sv1.Pod
- func NewSecretDefinition(labels, stringData map[string]string, data map[string][]byte, ...) *v1.Secret
- func NewStorageClassForBlockPVDefinition(storageClassName string) *storageV1.StorageClass
- func NewTargetBlockPVDefinition(pvName string, size string, labels map[string]string, storageClassName string, ...) *k8sv1.PersistentVolume
- func PodGetNode(clientSet *kubernetes.Clientset, podName, namespace string) (string, error)
- func RequestUploadToken(clientSet *cdiClientset.Clientset, pvc *k8sv1.PersistentVolumeClaim) (string, error)
- func RunGoCLICommand(cliPath string, args ...string) error
- func SetInsecureRegistry(client kubernetes.Interface, cdiNamespace, registryURL string) error
- func UploadBlockPVCDefinition() *k8sv1.PersistentVolumeClaim
- func UploadPVCDefinition() *k8sv1.PersistentVolumeClaim
- func UploadPodName(pvc *k8sv1.PersistentVolumeClaim) string
- func WaitForDataVolumePhase(clientSet *cdiclientset.Clientset, namespace string, ...) error
- func WaitForDeploymentReplicasReady(c *kubernetes.Clientset, namespace, name string) error
- func WaitForDeploymentReplicasReadyOrDie(c *kubernetes.Clientset, namespace, name string)
- func WaitForPVC(clientSet *kubernetes.Clientset, namespace, name string) (*k8sv1.PersistentVolumeClaim, error)
- func WaitForPVCAnnotation(clientSet *kubernetes.Clientset, namespace string, ...) (string, bool, error)
- func WaitForPVCAnnotationWithValue(clientSet *kubernetes.Clientset, namespace string, ...) (bool, error)
- func WaitForPersistentVolumeClaimPhase(clientSet *kubernetes.Clientset, namespace string, ...) error
- func WaitPVCDeleted(clientSet *kubernetes.Clientset, pvcName, namespace string, ...) (bool, error)
- func WaitPVCPodStatusFailed(clientSet *kubernetes.Clientset, pvc *k8sv1.PersistentVolumeClaim) (bool, error)
- func WaitPVCPodStatusRunning(clientSet *kubernetes.Clientset, pvc *k8sv1.PersistentVolumeClaim) (bool, error)
- func WaitPVCPodStatusSucceeded(clientSet *kubernetes.Clientset, pvc *k8sv1.PersistentVolumeClaim) (bool, error)
- func WaitPVCUploadPodStatusRunning(clientSet *kubernetes.Clientset, pvc *k8sv1.PersistentVolumeClaim) (bool, error)
- func WaitPodDeleted(clientSet *kubernetes.Clientset, podName, namespace string, ...) (bool, error)
- func WaitTimeoutForPVReady(clientSet *kubernetes.Clientset, pvName string, timeout time.Duration) error
- func WaitTimeoutForPVStatus(clientSet *kubernetes.Clientset, pvName string, ...) error
- func WaitTimeoutForPodFailed(clientSet *kubernetes.Clientset, podName, namespace string, ...) error
- func WaitTimeoutForPodReady(clientSet *kubernetes.Clientset, podName, namespace string, ...) error
- func WaitTimeoutForPodStatus(clientSet *kubernetes.Clientset, podName, namespace string, ...) error
- func WaitTimeoutForPodSucceeded(clientSet *kubernetes.Clientset, podName, namespace string, ...) error
Constants ¶
const ( //RegistryHostName provides a deploymnet and service name for registry RegistryHostName = "cdi-docker-registry-host" // RegistryHostNs provides a deployment ans service namespace for tests RegistryHostNs = "cdi" // FileHostName provides a deployment and service name for tests FileHostName = "cdi-file-host" // FileHostNs provides a deployment ans service namespace for tests FileHostNs = "cdi" // FileHostS3Bucket provides an S3 bucket name for tests (e.g. http://<serviceIP:port>/FileHostS3Bucket/image) FileHostS3Bucket = "images" // AccessKeyValue provides a username to use for http and S3 (see hack/build/docker/cdi-func-test-file-host-http/htpasswd) AccessKeyValue = "admin" // SecretKeyValue provides a password to use for http and S3 (see hack/build/docker/cdi-func-test-file-host-http/htpasswd) SecretKeyValue = "password" // HttpAuthPort provides a cdi-file-host service auth port for tests HTTPAuthPort = 81 // HttpNoAuthPort provides a cdi-file-host service no-auth port for tests, requires AccessKeyValue and SecretKeyValue HTTPNoAuthPort = 80 // HTTPRateLimitPort provides a cdi-file-host service rate limit port for tests, speed is limited to 25k/s to allow for testing slow connection behavior. No auth. HTTPRateLimitPort = 82 // S3Port provides a cdi-file-host service S3 port, requires AccessKey and SecretKeyValue S3Port = 9000 // HTTPSPort is the https port of cdi-file-host HTTPSNoAuthPort = 443 // RegistryCertConfigMap is the ConfigMap where the cert for the docker registry is stored RegistryCertConfigMap = "cdi-docker-registry-host-certs" // FileHostCertConfigMap is the ConfigMap where the cert fir the file host is stored FileHostCertConfigMap = "cdi-file-host-certs" )
cdi-file-host pod/service relative values
const ( // TinyCoreIsoURL provides a test url for the tineyCore iso image TinyCoreIsoURL = "http://cdi-file-host.cdi/tinyCore.iso" //TinyCoreIsoRegistryURL provides a test url for the tinycore.qcow2 image wrapped in docker container TinyCoreIsoRegistryURL = "docker://cdi-docker-registry-host.cdi/tinycoreqcow2" // HTTPSTinyCoreIsoURL provides a test (https) url for the tineyCore iso image HTTPSTinyCoreIsoURL = "https://cdi-file-host.cdi/tinyCore.iso" // TinyCoreQcow2URLRateLimit provides a test url for the tineyCore iso image TinyCoreQcow2URLRateLimit = "http://cdi-file-host.cdi:82/tinyCore.qcow2" )
const ( // DefaultPvcMountPath is the default mount path used DefaultPvcMountPath = "/pvc" // DefaultImagePath is the default destination for images created by CDI DefaultImagePath = DefaultPvcMountPath + "/disk.img" )
const ( // UploadFile is the file to upload UploadFile = "./images/tinyCore.iso" // UploadFileSize is the size of UploadFile UploadFileSize = 18874368 // UploadFileMD5 is the expected MD5 of the uploaded file UploadFileMD5 = "2a7a52285c846314d1dbd79e9818270d" // UploadFileMD5Extended is the size of the image after being extended UploadFileMD5Extended = "bbd634a97ffa672834717993b40e0ab7" )
const (
// PodWaitForTime is the time to wait for Pod operations to complete
PodWaitForTime = defaultPollPeriod
)
Variables ¶
This section is empty.
Functions ¶
func ArchiveFiles ¶ added in v1.4.0
ArchiveFiles creates a tar file that archives the given source files.
func ClearInsecureRegistry ¶ added in v1.6.0
func ClearInsecureRegistry(client kubernetes.Interface) error
ClearInsecureRegistry undoes whatever SetInsecureRegistry does
func CopyConfigMap ¶ added in v1.5.4
func CopyConfigMap(client kubernetes.Interface, srcNamespace, srcName, destNamespace, destName string) (string, error)
CopyConfigMap copies a ConfigMap
func CopyFileHostCertConfigMap ¶ added in v1.7.0
func CopyFileHostCertConfigMap(client kubernetes.Interface, destNamespace string) (string, error)
CopyFileHostCertConfigMap copies the test file host configmap
func CopyRegistryCertConfigMap ¶ added in v1.5.4
func CopyRegistryCertConfigMap(client kubernetes.Interface, destNamespace string) (string, error)
CopyRegistryCertConfigMap copies the test registry configmap
func CreateCertForTestService ¶ added in v1.7.0
func CreateCertForTestService(namespace, serviceName, configMapName, certDir, certFileName, keyFileName string) error
CreateCertForTestService creates a TLS key/cert for a service, writes them to files and creates a config map containing the cert
func CreateDataVolumeFromDefinition ¶
func CreateDataVolumeFromDefinition(clientSet *cdiclientset.Clientset, namespace string, def *cdiv1.DataVolume) (*cdiv1.DataVolume, error)
CreateDataVolumeFromDefinition is used by tests to create a testable Data Volume
func CreateExecutorPodWithPVC ¶
func CreateExecutorPodWithPVC(clientSet *kubernetes.Clientset, podName, namespace string, pvc *k8sv1.PersistentVolumeClaim) (*k8sv1.Pod, error)
CreateExecutorPodWithPVC creates a Pod with the passed in PVC mounted under /pvc. You can then use the executor utilities to run commands against the PVC through this Pod.
func CreatePVCFromDefinition ¶
func CreatePVCFromDefinition(clientSet *kubernetes.Clientset, namespace string, def *k8sv1.PersistentVolumeClaim) (*k8sv1.PersistentVolumeClaim, error)
CreatePVCFromDefinition creates a PVC in the passed in namespace from the passed in PersistentVolumeClaim definition. An example of creating a PVC without annotations looks like this: CreatePVCFromDefinition(client, namespace, NewPVCDefinition(name, size, nil, nil))
func CreatePVFromDefinition ¶ added in v1.5.0
func CreatePVFromDefinition(clientSet *kubernetes.Clientset, def *k8sv1.PersistentVolume) (*k8sv1.PersistentVolume, error)
CreatePVFromDefinition creates a PV from the passed in PersistentVolume definition. An example of creating a PVC without annotations looks like this: CreatePVCFromDefinition(client, namespace, NewPVCDefinition(name, size, nil, nil))
func CreatePod ¶
func CreatePod(clientSet *kubernetes.Clientset, namespace string, podDef *k8sv1.Pod) (*k8sv1.Pod, error)
CreatePod calls the Kubernetes API to create a Pod
func CreateSecretFromDefinition ¶
CreateSecretFromDefinition creates and returns a pointer ot a v1.Secret using a provided v1.Secret
func CreateStorageClassFromDefinition ¶ added in v1.8.0
func CreateStorageClassFromDefinition(clientSet *kubernetes.Clientset, def *storageV1.StorageClass) (*storageV1.StorageClass, error)
CreateStorageClassFromDefinition creates a StorageClass from the passed in StorageClass definition.
func DeleteDataVolume ¶
func DeleteDataVolume(clientSet *cdiclientset.Clientset, namespace, name string) error
DeleteDataVolume deletes the DataVolume with the given name
func DeletePV ¶ added in v1.5.0
func DeletePV(clientSet *kubernetes.Clientset, pv *k8sv1.PersistentVolume) error
DeletePV deletes the passed in PV
func DeletePVC ¶
func DeletePVC(clientSet *kubernetes.Clientset, namespace string, pvc *k8sv1.PersistentVolumeClaim) error
DeletePVC deletes the passed in PVC
func DeleteSecret ¶ added in v1.4.0
DeleteSecret ...
func DeleteStorageClass ¶ added in v1.8.0
func DeleteStorageClass(clientSet *kubernetes.Clientset, storageClass *storageV1.StorageClass) error
DeleteStorageClass deletes the passed in storageClass
func FindPVC ¶
func FindPVC(clientSet *kubernetes.Clientset, namespace, pvcName string) (*k8sv1.PersistentVolumeClaim, error)
FindPVC Finds the passed in PVC
func FindPodByPrefix ¶
func FindPodByPrefix(clientSet *kubernetes.Clientset, namespace, prefix, labelSelector string) (*k8sv1.Pod, error)
FindPodByPrefix finds the first pod which has the passed in prefix. Returns error if multiple pods with the same prefix are found.
func FormatTestData ¶
FormatTestData accepts the path of a single file (srcFile) and attempts to generate an output file in the format defined by targetFormats (e.g. ".tar", ".gz" will produce a .tar.gz formatted file). The output file is written to the directory in `tgtDir`. returns:
(string) Path of output file (error) Errors that occur during formatting
func GetServiceInNamespace ¶
GetServiceInNamespace retries get on service `name` in namespace `ns` until timeout or IsNotFound error. Ignores api errors that may be intermittent. Returns pointer to service (nil on error) or an error (nil on success)
func GetServiceInNamespaceOrDie ¶
func GetServiceInNamespaceOrDie(c *kubernetes.Clientset, ns, name string) *v1.Service
GetServiceInNamespaceOrDie attempts to get the service in namespace `ns` by `name`. Returns pointer to service on success. Panics on error.
func GetServiceNodePortByName ¶
GetServiceNodePortByName scans a service's nodePorts for a name matching the `name` parameter and returns the associated port integer or an error if not match is found.
func GetServicePortByName ¶
GetServicePortByName scans a service's ports for names matching `name`. Returns integer port value (0 on error) and error (nil on success).
func GetServicesInNamespaceByLabel ¶
func GetServicesInNamespaceByLabel(c *kubernetes.Clientset, ns, labelSelector string) (*v1.ServiceList, error)
GetServicesInNamespaceByLabel retries get of services in namespace `ns` by `labelSelector` until timeout. Ignores api errors that may be intermittent. Returns pointer to ServiceList (nil on error) and an error (nil on success)
func IsExpectedNode ¶ added in v1.5.0
func IsExpectedNode(clientSet *kubernetes.Clientset, nodeName, podName, namespace string, timeout time.Duration) error
IsExpectedNode waits to check if the specified pod is schedule on the specified node
func NewBlockPVCDefinition ¶ added in v1.8.0
func NewBlockPVCDefinition(pvcName string, size string, annotations, labels map[string]string, storageClassName string) *k8sv1.PersistentVolumeClaim
NewBlockPVCDefinition creates a PVC definition with volumeMode 'Block'
func NewBlockPVDefinition ¶ added in v1.8.0
func NewBlockPVDefinition(pvName string, size string, labels map[string]string, storageClassName string, nodeName string) *k8sv1.PersistentVolume
NewBlockPVDefinition creates a PV definition with volueMode 'Block'
func NewCloningDataVolume ¶ added in v1.5.0
func NewCloningDataVolume(dataVolumeName string, size string, sourcePvc *k8sv1.PersistentVolumeClaim) *cdiv1.DataVolume
NewCloningDataVolume initializes a DataVolume struct with PVC annotations
func NewDataVolumeCloneToBlockPV ¶ added in v1.9.4
func NewDataVolumeCloneToBlockPV(dataVolumeName string, size string, srcNamespace, srcName, storageClassName string) *cdiv1.DataVolume
NewDataVolumeCloneToBlockPV initializes a DataVolume for block cloning
func NewDataVolumeForBlankRawImage ¶ added in v1.5.0
func NewDataVolumeForBlankRawImage(dataVolumeName, size string) *cdiv1.DataVolume
NewDataVolumeForBlankRawImage initializes a DataVolume struct for creating blank raw image
func NewDataVolumeForImageCloning ¶ added in v1.5.0
func NewDataVolumeForImageCloning(dataVolumeName, size string, namespace, pvcName string) *cdiv1.DataVolume
NewDataVolumeForImageCloning initializes a DataVolume struct for cloning disk image
func NewDataVolumeForUpload ¶ added in v1.5.0
func NewDataVolumeForUpload(dataVolumeName string, size string) *cdiv1.DataVolume
NewDataVolumeForUpload initializes a DataVolume struct with Upload annotations
func NewDataVolumeWithHTTPImport ¶ added in v1.3.0
func NewDataVolumeWithHTTPImport(dataVolumeName string, size string, httpURL string) *cdiv1.DataVolume
NewDataVolumeWithHTTPImport initializes a DataVolume struct with HTTP annotations
func NewDataVolumeWithHTTPImportToBlockPV ¶ added in v1.8.0
func NewDataVolumeWithHTTPImportToBlockPV(dataVolumeName string, size string, httpURL string) *cdiv1.DataVolume
NewDataVolumeWithHTTPImportToBlockPV initializes a DataVolume struct with HTTP annotations to import to block PV
func NewDataVolumeWithRegistryImport ¶ added in v1.5.0
func NewDataVolumeWithRegistryImport(dataVolumeName string, size string, registryURL string) *cdiv1.DataVolume
NewDataVolumeWithRegistryImport initializes a DataVolume struct with registry annotations
func NewPVCDefinition ¶
func NewPVCDefinition(pvcName string, size string, annotations, labels map[string]string) *k8sv1.PersistentVolumeClaim
NewPVCDefinition creates a PVC definition using the passed in name and requested size. You can use the following annotation keys to request an import or clone. The values are defined in the controller package AnnEndpoint AnnSecret AnnCloneRequest You can also pass in any label you want.
func NewPVCDefinitionWithSelector ¶ added in v1.5.0
func NewPVCDefinitionWithSelector(pvcName, size string, selector map[string]string, annotations, labels map[string]string, storageClassName string) *k8sv1.PersistentVolumeClaim
NewPVCDefinitionWithSelector creates a PVC definition.
func NewPVDefinition ¶ added in v1.5.0
func NewPVDefinition(pvName string, size string, labels map[string]string, storageClassName string) *k8sv1.PersistentVolume
NewPVDefinition creates a PV definition.
func NewPodWithPVC ¶
func NewPodWithPVC(podName, cmd string, pvc *k8sv1.PersistentVolumeClaim) *k8sv1.Pod
NewPodWithPVC creates a new pod that mounts the given PVC
func NewSecretDefinition ¶
func NewSecretDefinition(labels, stringData map[string]string, data map[string][]byte, ns, prefix string) *v1.Secret
NewSecretDefinition provides a function to initialize a Secret data type with the provided options
func NewStorageClassForBlockPVDefinition ¶ added in v1.8.0
func NewStorageClassForBlockPVDefinition(storageClassName string) *storageV1.StorageClass
NewStorageClassForBlockPVDefinition creates a StorageClass definition for Block PV
func NewTargetBlockPVDefinition ¶ added in v1.9.0
func NewTargetBlockPVDefinition(pvName string, size string, labels map[string]string, storageClassName string, nodeName string) *k8sv1.PersistentVolume
NewTargetBlockPVDefinition creates a target PV definition with volueMode 'Block'
func PodGetNode ¶
func PodGetNode(clientSet *kubernetes.Clientset, podName, namespace string) (string, error)
PodGetNode returns the node on which a given pod is executing
func RequestUploadToken ¶
func RequestUploadToken(clientSet *cdiClientset.Clientset, pvc *k8sv1.PersistentVolumeClaim) (string, error)
RequestUploadToken sends an upload token request to the server
func RunGoCLICommand ¶
RunGoCLICommand egecutes gocli with given args
func SetInsecureRegistry ¶ added in v1.6.0
func SetInsecureRegistry(client kubernetes.Interface, cdiNamespace, registryURL string) error
SetInsecureRegistry sets the configmap entry to mark the registry as okay to be insecure
func UploadBlockPVCDefinition ¶ added in v1.9.0
func UploadBlockPVCDefinition() *k8sv1.PersistentVolumeClaim
UploadBlockPVCDefinition creates a PVC with the upload target annotation for block PV
func UploadPVCDefinition ¶
func UploadPVCDefinition() *k8sv1.PersistentVolumeClaim
UploadPVCDefinition creates a PVC with the upload target annotation
func UploadPodName ¶
func UploadPodName(pvc *k8sv1.PersistentVolumeClaim) string
UploadPodName returns the name of the upload server pod associated with a PVC
func WaitForDataVolumePhase ¶
func WaitForDataVolumePhase(clientSet *cdiclientset.Clientset, namespace string, phase cdiv1.DataVolumePhase, dataVolumeName string) error
WaitForDataVolumePhase waits for DV's phase to be in a particular phase (Pending, Bound, or Lost)
func WaitForDeploymentReplicasReady ¶
func WaitForDeploymentReplicasReady(c *kubernetes.Clientset, namespace, name string) error
WaitForDeploymentReplicasReady will wait for replicase to become ready and return an error if they do not
func WaitForDeploymentReplicasReadyOrDie ¶
func WaitForDeploymentReplicasReadyOrDie(c *kubernetes.Clientset, namespace, name string)
WaitForDeploymentReplicasReadyOrDie adds the ability to fatal out if the replicas don't become ready
func WaitForPVC ¶ added in v1.9.4
func WaitForPVC(clientSet *kubernetes.Clientset, namespace, name string) (*k8sv1.PersistentVolumeClaim, error)
WaitForPVC waits for a PVC
func WaitForPVCAnnotation ¶
func WaitForPVCAnnotation(clientSet *kubernetes.Clientset, namespace string, pvc *k8sv1.PersistentVolumeClaim, annotation string) (string, bool, error)
WaitForPVCAnnotation waits for an anotation to appear on a PVC
func WaitForPVCAnnotationWithValue ¶
func WaitForPVCAnnotationWithValue(clientSet *kubernetes.Clientset, namespace string, pvc *k8sv1.PersistentVolumeClaim, annotation, expected string) (bool, error)
WaitForPVCAnnotationWithValue waits for an annotation with a specific value on a PVC
func WaitForPersistentVolumeClaimPhase ¶
func WaitForPersistentVolumeClaimPhase(clientSet *kubernetes.Clientset, namespace string, phase k8sv1.PersistentVolumeClaimPhase, pvcName string) error
WaitForPersistentVolumeClaimPhase waits for the PVC to be in a particular phase (Pending, Bound, or Lost)
func WaitPVCDeleted ¶ added in v1.4.0
func WaitPVCDeleted(clientSet *kubernetes.Clientset, pvcName, namespace string, timeout time.Duration) (bool, error)
WaitPVCDeleted polls the specified PVC until timeout or it's not found, returns true if deleted in the specified timeout period, and any errors
func WaitPVCPodStatusFailed ¶ added in v1.8.0
func WaitPVCPodStatusFailed(clientSet *kubernetes.Clientset, pvc *k8sv1.PersistentVolumeClaim) (bool, error)
WaitPVCPodStatusFailed waits for the pod status annotation to be Failed
func WaitPVCPodStatusRunning ¶ added in v1.8.0
func WaitPVCPodStatusRunning(clientSet *kubernetes.Clientset, pvc *k8sv1.PersistentVolumeClaim) (bool, error)
WaitPVCPodStatusRunning waits for the pod status annotation to be Running
func WaitPVCPodStatusSucceeded ¶ added in v1.8.0
func WaitPVCPodStatusSucceeded(clientSet *kubernetes.Clientset, pvc *k8sv1.PersistentVolumeClaim) (bool, error)
WaitPVCPodStatusSucceeded waits for the pod status annotation to be Succeeded
func WaitPVCUploadPodStatusRunning ¶
func WaitPVCUploadPodStatusRunning(clientSet *kubernetes.Clientset, pvc *k8sv1.PersistentVolumeClaim) (bool, error)
WaitPVCUploadPodStatusRunning waits for the upload server pod status annotation to be Running
func WaitPodDeleted ¶
func WaitPodDeleted(clientSet *kubernetes.Clientset, podName, namespace string, timeout time.Duration) (bool, error)
WaitPodDeleted waits fo a pod to no longer exist returns whether the pod is deleted along with any error
func WaitTimeoutForPVReady ¶ added in v1.5.0
func WaitTimeoutForPVReady(clientSet *kubernetes.Clientset, pvName string, timeout time.Duration) error
WaitTimeoutForPVReady waits for the given pv to be created and ready
func WaitTimeoutForPVStatus ¶ added in v1.5.0
func WaitTimeoutForPVStatus(clientSet *kubernetes.Clientset, pvName string, status k8sv1.PersistentVolumePhase, timeout time.Duration) error
WaitTimeoutForPVStatus waits for the given pv to be created and have a expected status
func WaitTimeoutForPodFailed ¶ added in v1.6.0
func WaitTimeoutForPodFailed(clientSet *kubernetes.Clientset, podName, namespace string, timeout time.Duration) error
WaitTimeoutForPodFailed waits for pod to fail
func WaitTimeoutForPodReady ¶
func WaitTimeoutForPodReady(clientSet *kubernetes.Clientset, podName, namespace string, timeout time.Duration) error
WaitTimeoutForPodReady waits for the given pod to be created and ready
func WaitTimeoutForPodStatus ¶
func WaitTimeoutForPodStatus(clientSet *kubernetes.Clientset, podName, namespace string, status k8sv1.PodPhase, timeout time.Duration) error
WaitTimeoutForPodStatus waits for the given pod to be created and have a expected status
func WaitTimeoutForPodSucceeded ¶
func WaitTimeoutForPodSucceeded(clientSet *kubernetes.Clientset, podName, namespace string, timeout time.Duration) error
WaitTimeoutForPodSucceeded waits for pod to succeed
Types ¶
This section is empty.