Documentation ¶
Index ¶
- Constants
- Variables
- func GetVolumeSnapshotClass(namespace string) *volumesnapshotv1.VolumeSnapshotClass
- func InitializeVPCClient()
- func WaitForFileSystemToResize(t *TestPod, expectedOut int64, timeout time.Duration, interval time.Duration) error
- func WaitForPvToResize(c clientset.Interface, ns *v1.Namespace, pvName string, ...) error
- type DaemonsetWithVolWRTest
- type DataSource
- type DynamicallyProvisioneDeployWithVolWRTest
- func (t *DynamicallyProvisioneDeployWithVolWRTest) Run(client clientset.Interface, namespace *v1.Namespace)
- func (t *DynamicallyProvisioneDeployWithVolWRTest) RunMultiVol(client clientset.Interface, namespace *v1.Namespace)
- func (t *DynamicallyProvisioneDeployWithVolWRTest) RunShouldFail(client clientset.Interface, namespace *v1.Namespace)
- type DynamicallyProvisioneMultiPodWithVolTest
- type DynamicallyProvisionePodWithVolTest
- type DynamicallyProvisionedResizeVolumeTest
- type PodDetails
- func (pod *PodDetails) SetupDaemonset(client clientset.Interface, namespace *v1.Namespace, serviceName string, ...) (*TestDaemonsets, []func())
- func (pod *PodDetails) SetupDeployment(client clientset.Interface, namespace *v1.Namespace, replicaCount int32) (*TestDeployment, []func())
- func (pod *PodDetails) SetupDeploymentWithMultiVol(client clientset.Interface, namespace *v1.Namespace) (*TestDeployment, []func())
- func (pod *PodDetails) SetupStatefulset(client clientset.Interface, namespace *v1.Namespace, serviceName string, ...) (*TestStatefulsets, []func())
- func (pod *PodDetails) SetupWithDynamicVolumes(client clientset.Interface, namespace *v1.Namespace) (*TestPod, []func())
- func (pod *PodDetails) SetupWithPVC(client clientset.Interface, namespace *v1.Namespace, name string) (*TestPod, []func())
- type PodExecCheck
- type StatefulsetWithVolWRTest
- type TestDaemonsets
- type TestDeployment
- func (t *TestDeployment) Cleanup()
- func (t *TestDeployment) Create()
- func (t *TestDeployment) CreateWithoutWaitingForDeploymemtStatus()
- func (t *TestDeployment) DeletePodAndWait()
- func (t *TestDeployment) Exec(command []string, expectedString string)
- func (t *TestDeployment) Logs()
- func (t *TestDeployment) SetupVolume(pvc *v1.PersistentVolumeClaim, name, mountPath string, readOnly bool)
- func (t *TestDeployment) WaitForPodReady()
- type TestHeadlessService
- type TestPersistentVolumeClaim
- func (t *TestPersistentVolumeClaim) Cleanup()
- func (t *TestPersistentVolumeClaim) Create()
- func (t *TestPersistentVolumeClaim) DeleteBoundPersistentVolume()
- func (t *TestPersistentVolumeClaim) NewTestDaemonset(c clientset.Interface, ns *v1.Namespace, pvc *v1.PersistentVolumeClaim, ...) *TestDaemonsets
- func (t *TestPersistentVolumeClaim) NewTestStatefulset(c clientset.Interface, ns *v1.Namespace, ...) *TestStatefulsets
- func (t *TestPersistentVolumeClaim) ReclaimPolicy() v1.PersistentVolumeReclaimPolicy
- func (t *TestPersistentVolumeClaim) ValidateProvisionedPersistentVolume()
- func (t *TestPersistentVolumeClaim) WaitForBound() v1.PersistentVolumeClaim
- func (t *TestPersistentVolumeClaim) WaitForPending() v1.PersistentVolumeClaim
- func (t *TestPersistentVolumeClaim) WaitForPersistentVolumePhase(phase v1.PersistentVolumePhase)
- type TestPod
- func (t *TestPod) Cleanup()
- func (t *TestPod) Create()
- func (t *TestPod) Delete()
- func (t *TestPod) DumpDbgInfoOff()
- func (t *TestPod) DumpLogOff()
- func (t *TestPod) Exec(command []string, expectedString string)
- func (t *TestPod) Logs()
- func (t *TestPod) SetNodeSelector(nodeSelector map[string]string)
- func (t *TestPod) SetupVolume(pvc *v1.PersistentVolumeClaim, name, mountPath string, readOnly bool)
- func (t *TestPod) WaitForFailure()
- func (t *TestPod) WaitForRunning()
- func (t *TestPod) WaitForRunningSlow()
- func (t *TestPod) WaitForSuccess()
- type TestPreProvisionedPersistentVolume
- type TestSecret
- type TestStatefulsets
- type TestStorageClass
- type TestVolumeSnapshotClass
- func (t *TestVolumeSnapshotClass) Cleanup()
- func (t *TestVolumeSnapshotClass) Create()
- func (t *TestVolumeSnapshotClass) CreateSnapshot(pvc *v1.PersistentVolumeClaim) *volumesnapshotv1.VolumeSnapshot
- func (t *TestVolumeSnapshotClass) DeleteSnapshot(vs *volumesnapshotv1.VolumeSnapshot)
- func (t *TestVolumeSnapshotClass) ReadyToUse(snapshot *volumesnapshotv1.VolumeSnapshot, snapFail bool)
- type VolumeDetails
- type VolumeDeviceDetails
- type VolumeMode
- type VolumeMountDetails
Constants ¶
const ( VolumeSnapshotKind = "VolumeSnapshot" SnapshotAPIVersion = "snapshot.storage.k8s.io/v1" APIVersionv1 = "v1" VolumeSnapshotClassKind = "VolumeSnapshotClass" )
const ( //VolumeIDSeperator ... VolumeIDSeperator = "#" //DeprecatedVolumeIDSeperator ... DeprecatedVolumeIDSeperator = ":" )
const ( BusyboxTestImage = "gcr.io/google_containers/busybox:1.24" MountPath = "/devtestvol" )
Variables ¶
var ( SnapshotAPIGroup = "snapshot.storage.k8s.io" VPCService *vpcbetav1.VpcbetaV1 )
Functions ¶
func GetVolumeSnapshotClass ¶
func GetVolumeSnapshotClass(namespace string) *volumesnapshotv1.VolumeSnapshotClass
func InitializeVPCClient ¶
func InitializeVPCClient()
Types ¶
type DaemonsetWithVolWRTest ¶
type DaemonsetWithVolWRTest struct { Pod PodDetails PodCheck *PodExecCheck Labels map[string]string ReplicaCount int32 ServiceName string }
type DataSource ¶
type DataSource struct {
Name string
}
type DynamicallyProvisioneDeployWithVolWRTest ¶
type DynamicallyProvisioneDeployWithVolWRTest struct { Pod PodDetails PodCheck *PodExecCheck ReplicaCount int32 }
DynamicallyProvisioneVolPodWRTest will provision required PVC and Deployment Testing if the Pod can write and read to mounted volumes Deleting a pod, and again testing if the Pod can write and read to mounted volumes
func (*DynamicallyProvisioneDeployWithVolWRTest) Run ¶
func (t *DynamicallyProvisioneDeployWithVolWRTest) Run(client clientset.Interface, namespace *v1.Namespace)
func (*DynamicallyProvisioneDeployWithVolWRTest) RunMultiVol ¶
func (t *DynamicallyProvisioneDeployWithVolWRTest) RunMultiVol(client clientset.Interface, namespace *v1.Namespace)
func (*DynamicallyProvisioneDeployWithVolWRTest) RunShouldFail ¶ added in v1.2.5
func (t *DynamicallyProvisioneDeployWithVolWRTest) RunShouldFail(client clientset.Interface, namespace *v1.Namespace)
type DynamicallyProvisioneMultiPodWithVolTest ¶
type DynamicallyProvisioneMultiPodWithVolTest struct { Pods []PodDetails PodCheck *PodExecCheck }
DynamicallyProvisioneVolPodWRTest will provision required PVC and Deployment Testing if the Pod can write and read to mounted volumes Deleting a pod, and again testing if the Pod can write and read to mounted volumes
type DynamicallyProvisionePodWithVolTest ¶
type DynamicallyProvisionePodWithVolTest struct { Pods []PodDetails PodCheck *PodExecCheck }
DynamicallyProvisioneVolPodWRTest will provision required PVC and Deployment Testing if the Pod can write and read to mounted volumes Deleting a pod, and again testing if the Pod can write and read to mounted volumes
type DynamicallyProvisionedResizeVolumeTest ¶
type DynamicallyProvisionedResizeVolumeTest struct { Pods []PodDetails PodCheck *PodExecCheck ExpandVolSizeG int64 ExpandedSize int64 }
DynamicallyProvisionedResizeVolumeTest will provision required StorageClass(es), PVC(s) and Pod(s) Waiting for the PV provisioner to create a new PV Update pvc storage size Waiting for new PVC and PV to be ready And finally attach pvc to the pod and wait for pod to be ready.
type PodDetails ¶
type PodDetails struct { Cmd string CmdExits bool Volumes []VolumeDetails NodeSelector map[string]string }
func (*PodDetails) SetupDaemonset ¶
func (pod *PodDetails) SetupDaemonset(client clientset.Interface, namespace *v1.Namespace, serviceName string, labels map[string]string) (*TestDaemonsets, []func())
func (*PodDetails) SetupDeployment ¶
func (pod *PodDetails) SetupDeployment(client clientset.Interface, namespace *v1.Namespace, replicaCount int32) (*TestDeployment, []func())
func (*PodDetails) SetupDeploymentWithMultiVol ¶
func (pod *PodDetails) SetupDeploymentWithMultiVol(client clientset.Interface, namespace *v1.Namespace) (*TestDeployment, []func())
func (*PodDetails) SetupStatefulset ¶
func (pod *PodDetails) SetupStatefulset(client clientset.Interface, namespace *v1.Namespace, serviceName string, labels map[string]string, replicaCount int32) (*TestStatefulsets, []func())
func (*PodDetails) SetupWithDynamicVolumes ¶
func (*PodDetails) SetupWithPVC ¶
type PodExecCheck ¶
type StatefulsetWithVolWRTest ¶
type StatefulsetWithVolWRTest struct { Pod PodDetails PodCheck *PodExecCheck Labels map[string]string ReplicaCount int32 ServiceName string }
type TestDaemonsets ¶
type TestDaemonsets struct {
// contains filtered or unexported fields
}
func (*TestDaemonsets) Cleanup ¶
func (t *TestDaemonsets) Cleanup()
func (*TestDaemonsets) Create ¶
func (t *TestDaemonsets) Create()
func (*TestDaemonsets) Exec ¶
func (t *TestDaemonsets) Exec(command []string, expectedString string)
func (*TestDaemonsets) Logs ¶
func (t *TestDaemonsets) Logs()
func (*TestDaemonsets) WaitForPodReady ¶
func (t *TestDaemonsets) WaitForPodReady()
type TestDeployment ¶
type TestDeployment struct {
// contains filtered or unexported fields
}
func NewTestDeployment ¶
func (*TestDeployment) Cleanup ¶
func (t *TestDeployment) Cleanup()
func (*TestDeployment) Create ¶
func (t *TestDeployment) Create()
func (*TestDeployment) CreateWithoutWaitingForDeploymemtStatus ¶ added in v1.2.5
func (t *TestDeployment) CreateWithoutWaitingForDeploymemtStatus()
CreateWithoutWaitingForDeploymemtStatus creates deployment without waiting for the pods to be in running state.
func (*TestDeployment) DeletePodAndWait ¶
func (t *TestDeployment) DeletePodAndWait()
func (*TestDeployment) Exec ¶
func (t *TestDeployment) Exec(command []string, expectedString string)
func (*TestDeployment) Logs ¶
func (t *TestDeployment) Logs()
func (*TestDeployment) SetupVolume ¶
func (t *TestDeployment) SetupVolume(pvc *v1.PersistentVolumeClaim, name, mountPath string, readOnly bool)
func (*TestDeployment) WaitForPodReady ¶
func (t *TestDeployment) WaitForPodReady()
type TestHeadlessService ¶
type TestHeadlessService struct {
// contains filtered or unexported fields
}
func NewHeadlessService ¶
func NewHeadlessService(c clientset.Interface, name, namespace, labelSelctors string) *TestHeadlessService
func (*TestHeadlessService) Cleanup ¶
func (h *TestHeadlessService) Cleanup()
func (*TestHeadlessService) Create ¶
func (h *TestHeadlessService) Create() v1.Service
type TestPersistentVolumeClaim ¶
type TestPersistentVolumeClaim struct {
// contains filtered or unexported fields
}
func NewTestPersistentVolumeClaim ¶
func NewTestPersistentVolumeClaim( c clientset.Interface, pvcName string, ns *v1.Namespace, claimSize string, accessmode *v1.PersistentVolumeAccessMode, volumeMode VolumeMode, sc *storagev1.StorageClass) *TestPersistentVolumeClaim
func NewTestPersistentVolumeClaimWithDataSource ¶
func NewTestPersistentVolumeClaimWithDataSource( c clientset.Interface, pvcName string, ns *v1.Namespace, claimSize string, volumeMode VolumeMode, sc *storagev1.StorageClass, dataSource *v1.TypedLocalObjectReference) *TestPersistentVolumeClaim
func (*TestPersistentVolumeClaim) Cleanup ¶
func (t *TestPersistentVolumeClaim) Cleanup()
func (*TestPersistentVolumeClaim) Create ¶
func (t *TestPersistentVolumeClaim) Create()
func (*TestPersistentVolumeClaim) DeleteBoundPersistentVolume ¶
func (t *TestPersistentVolumeClaim) DeleteBoundPersistentVolume()
func (*TestPersistentVolumeClaim) NewTestDaemonset ¶
func (t *TestPersistentVolumeClaim) NewTestDaemonset(c clientset.Interface, ns *v1.Namespace, pvc *v1.PersistentVolumeClaim, command, storageClassName, volumeName, mountPath string, labels map[string]string) *TestDaemonsets
func (*TestPersistentVolumeClaim) NewTestStatefulset ¶
func (t *TestPersistentVolumeClaim) NewTestStatefulset(c clientset.Interface, ns *v1.Namespace, servicename, command, storageClassName, volumeName, mountPath string, labels map[string]string, replicaCount int32) *TestStatefulsets
func (*TestPersistentVolumeClaim) ReclaimPolicy ¶
func (t *TestPersistentVolumeClaim) ReclaimPolicy() v1.PersistentVolumeReclaimPolicy
func (*TestPersistentVolumeClaim) ValidateProvisionedPersistentVolume ¶
func (t *TestPersistentVolumeClaim) ValidateProvisionedPersistentVolume()
func (*TestPersistentVolumeClaim) WaitForBound ¶
func (t *TestPersistentVolumeClaim) WaitForBound() v1.PersistentVolumeClaim
func (*TestPersistentVolumeClaim) WaitForPending ¶
func (t *TestPersistentVolumeClaim) WaitForPending() v1.PersistentVolumeClaim
func (*TestPersistentVolumeClaim) WaitForPersistentVolumePhase ¶
func (t *TestPersistentVolumeClaim) WaitForPersistentVolumePhase(phase v1.PersistentVolumePhase)
type TestPod ¶
type TestPod struct {
// contains filtered or unexported fields
}
func NewTestPodWithName ¶
func (*TestPod) DumpDbgInfoOff ¶
func (t *TestPod) DumpDbgInfoOff()
func (*TestPod) DumpLogOff ¶
func (t *TestPod) DumpLogOff()
func (*TestPod) SetNodeSelector ¶
func (*TestPod) SetupVolume ¶
func (t *TestPod) SetupVolume(pvc *v1.PersistentVolumeClaim, name, mountPath string, readOnly bool)
func (*TestPod) WaitForFailure ¶
func (t *TestPod) WaitForFailure()
func (*TestPod) WaitForRunning ¶
func (t *TestPod) WaitForRunning()
func (*TestPod) WaitForRunningSlow ¶
func (t *TestPod) WaitForRunningSlow()
func (*TestPod) WaitForSuccess ¶
func (t *TestPod) WaitForSuccess()
type TestPreProvisionedPersistentVolume ¶
type TestPreProvisionedPersistentVolume struct {
// contains filtered or unexported fields
}
func NewTestPreProvisionedPersistentVolume ¶
func NewTestPreProvisionedPersistentVolume(c clientset.Interface, pv *v1.PersistentVolume) *TestPreProvisionedPersistentVolume
func (*TestPreProvisionedPersistentVolume) Create ¶
func (pv *TestPreProvisionedPersistentVolume) Create() v1.PersistentVolume
type TestSecret ¶
type TestSecret struct {
// contains filtered or unexported fields
}
func NewSecret ¶
func NewSecret(c clientset.Interface, name, ns, iops, tags, encrypt, encryptKey, stype string) *TestSecret
func (*TestSecret) Cleanup ¶
func (s *TestSecret) Cleanup()
func (*TestSecret) Create ¶
func (s *TestSecret) Create()
type TestStatefulsets ¶
type TestStatefulsets struct {
// contains filtered or unexported fields
}
func (*TestStatefulsets) Cleanup ¶
func (t *TestStatefulsets) Cleanup()
func (*TestStatefulsets) Create ¶
func (t *TestStatefulsets) Create()
func (*TestStatefulsets) Exec ¶
func (t *TestStatefulsets) Exec(command []string, expectedString string)
func (*TestStatefulsets) Logs ¶
func (t *TestStatefulsets) Logs()
func (*TestStatefulsets) WaitForPodReady ¶
func (t *TestStatefulsets) WaitForPodReady()
type TestStorageClass ¶
type TestStorageClass struct {
// contains filtered or unexported fields
}
func NewTestStorageClass ¶
func NewTestStorageClass(c clientset.Interface, ns *v1.Namespace, sc *storagev1.StorageClass) *TestStorageClass
func (*TestStorageClass) Cleanup ¶
func (t *TestStorageClass) Cleanup()
func (*TestStorageClass) Create ¶
func (t *TestStorageClass) Create() storagev1.StorageClass
type TestVolumeSnapshotClass ¶
type TestVolumeSnapshotClass struct {
// contains filtered or unexported fields
}
func CreateVolumeSnapshotClass ¶
func CreateVolumeSnapshotClass(client restclientset.Interface, namespace *v1.Namespace) (*TestVolumeSnapshotClass, func())
func NewTestVolumeSnapshotClass ¶
func NewTestVolumeSnapshotClass(c restclientset.Interface, ns *v1.Namespace, vsc *volumesnapshotv1.VolumeSnapshotClass) *TestVolumeSnapshotClass
func (*TestVolumeSnapshotClass) Cleanup ¶
func (t *TestVolumeSnapshotClass) Cleanup()
func (*TestVolumeSnapshotClass) Create ¶
func (t *TestVolumeSnapshotClass) Create()
func (*TestVolumeSnapshotClass) CreateSnapshot ¶
func (t *TestVolumeSnapshotClass) CreateSnapshot(pvc *v1.PersistentVolumeClaim) *volumesnapshotv1.VolumeSnapshot
func (*TestVolumeSnapshotClass) DeleteSnapshot ¶
func (t *TestVolumeSnapshotClass) DeleteSnapshot(vs *volumesnapshotv1.VolumeSnapshot)
func (*TestVolumeSnapshotClass) ReadyToUse ¶
func (t *TestVolumeSnapshotClass) ReadyToUse(snapshot *volumesnapshotv1.VolumeSnapshot, snapFail bool)
type VolumeDetails ¶
type VolumeDetails struct { PVCName string //PVC Name VolumeType string //PVC SC FSType string //Ext3 / XFS / EXT4 Encrypted bool MountOptions []string ClaimSize string //PVC Capacity ReclaimPolicy *v1.PersistentVolumeReclaimPolicy VolumeBindingMode *storagev1.VolumeBindingMode AllowedTopologyValues []string AccessMode *v1.PersistentVolumeAccessMode VolumeMode VolumeMode VolumeMount VolumeMountDetails VolumeDevice VolumeDeviceDetails DataSource *DataSource // contains filtered or unexported fields }
func (*VolumeDetails) SetupDynamicPersistentVolumeClaim ¶
func (volume *VolumeDetails) SetupDynamicPersistentVolumeClaim(client clientset.Interface, namespace *v1.Namespace, pvcErrExpected bool) (*TestPersistentVolumeClaim, []func())
type VolumeDeviceDetails ¶
type VolumeDeviceDetails struct {
NameGenerate string
}