Documentation
¶
Index ¶
- Constants
- Variables
- func AddControlNodeNoScheduleTaintOnNode(nodeName string) error
- func AddHelmRepository(helmRepoName, helmRepoUrl string) error
- func AddNoScheduleTaintOnNode(nodeName string) error
- func AddSnapshotContentAnnotation(snapshotContentName, annotationKey, annotationValue string) error
- func AfterSuiteCleanup()
- func ApplyIoEngineLabelToNode(nodeIP string, nodeName string, podPrefix string, timeoutSecs int) error
- func ApplyNodeSelectorToDaemonset(daemonsetName string, namespace string, label string, value string) error
- func ApplyNodeSelectorToDeployment(deploymentName string, namespace string, label string, value string) error
- func ApplyNodeSelectorToPodObject(pod *coreV1.Pod, label string, value string)
- func ApplyNodeSelectorToStatefulset(stsName string, namespace string, label string, value string) error
- func AreNodesReady() (bool, error)
- func BounceDeployment(deploymentName string, namespace string, timeout_seconds int) (int32, error)
- func ByteCompareVolumeReplicas(volName string, ns string) (bool, string, error)
- func CheckAllMsvsAreHealthy() error
- func CheckAndSetControlPlane() error
- func CheckCsiNodeTopologyKeysPresent(nodeName string, driverName string, key []string) (bool, error)
- func CheckFioPodCompleted(podName string, nameSpace string) (coreV1.PodPhase, *common.E2eFioPodLogSynopsis, error)
- func CheckForMsvs() (bool, error)
- func CheckForPVCs() (bool, error)
- func CheckForPVs() (bool, error)
- func CheckForStorageClasses() (bool, error)
- func CheckForTestPods() (bool, error)
- func CheckIfAllResourcesAreDifferent(resourceList []string) bool
- func CheckMsPodOnNodeByPrefix(nodeIP string, prefix string) bool
- func CheckMsvIsDeleted(uuid string) error
- func CheckPodCompleted(podName string, nameSpace string) (coreV1.PodPhase, error)
- func CheckPodContainerCompleted(podName string, nameSpace string) (coreV1.PodPhase, error)
- func CheckPodIsRunningByPrefix(prefix string) bool
- func CheckReplicaComparisonPossible(volUuid string, volName string, volType common.VolumeType, timeout int) error
- func CheckTestPodsHealth(namespace string) error
- func ChecksumReplica(initiatorIP, targetIP, nqn string, maxRetries int, nexusNodeNqn string) (string, error)
- func CleanUp() bool
- func CleanUpBusyboxResources(pods []string, pvcName string) error
- func ClearStorageClasses()
- func CompareReplicas(nexusIP string, replica_1_IP string, replica_2_IP string, volUUID string) error
- func CompareVolumeReplicas(volName string, ns string) common.ReplicasComparison
- func ConfigureLoopDeviceOnNode(node string, size int64, imageDir string) (e2e_agent.LoopDevice, error)
- func ConfigureLoopDeviceOnNodes(nodeDeviceMap map[string]e2e_agent.LoopDevice) (map[string]e2e_agent.LoopDevice, error)
- func ContainsK8sControlPlaneLabels(labels map[string]string) bool
- func ControlPlaneReady(sleepTime int, duration int) bool
- func CreateConfiguredPools() error
- func CreateConfiguredPoolsAndWait(timeoutsecs int) error
- func CreateDeployment(obj *appsv1.Deployment) error
- func CreateDiskPartitions(addr string, count int, partitionSizeInGiB int, diskPath string) error
- func CreateDiskPartitionsMib(addr string, count int, partitionSizeInMiB int, diskPath string) error
- func CreateDiskPoolsConfiguration() error
- func CreateFioPod(podName string, volName string, volType common.VolumeType, nameSpace string) (*coreV1.Pod, error)
- func CreateFioPodDef(podName string, volName string, volType common.VolumeType, nameSpace string) *coreV1.Pod
- func CreateFioPodOnNode(podName string, volName string, nodeName string, args []string) error
- func CreateFioPodWithNodeSelector(podName string, volName string, volType common.VolumeType, nodeName string, ...) error
- func CreatePVC(pvc *coreV1.PersistentVolumeClaim, nameSpace string) (*coreV1.PersistentVolumeClaim, error)
- func CreatePod(podDef *coreV1.Pod, nameSpace string) (*coreV1.Pod, error)
- func CreatePoolOnNode(nodeName string, poolName string) error
- func CreatePoolOnNodeAndWait(nodeName string, poolName string, timeoutsecs int) (bool, error)
- func CreatePvc(createOpts *coreV1.PersistentVolumeClaim, errBuf *error, uuid *string, ...)
- func CreateRdmaDeviceOnAllIoEngineNodes() error
- func CreateRdmaDeviceOnNode(node string) error
- func CreateSc(obj *storagev1.StorageClass) error
- func CreateSleepingFioPod(fioPodName string, volName string, volType common.VolumeType) error
- func CreateSleepingFioPodOnNode(fioPodName string, volName string, volType common.VolumeType, nodename string) error
- func CreateSnapshot(pvcName string, snapshotClassName string, nameSpace string, ...) (*snapshotv1.VolumeSnapshot, error)
- func CreateSnapshotClass(snapshotClassName string, csiDriver string) error
- func CreateStatefulset(obj *appsv1.StatefulSet) error
- func CreateVolumeSnapshot(snapshotClassName string, snapshotName string, pvc string, namespace string, ...) (*v1.VolumeSnapshot, string, error)
- func DaemonSetReady(daemonName string, namespace string) bool
- func DeleteAllDeployments(nameSpace string) (int, error)
- func DeleteAllMsvs() (int, error)
- func DeleteAllPods(nameSpace string) (int, error)
- func DeleteAllPools() bool
- func DeleteAllPvcs(nameSpace string) (int, error)
- func DeleteAllPvs() (int, error)
- func DeleteAllSnapshots(nameSpace string) (int, error)
- func DeleteConfigMap(name string, nameSpace string) error
- func DeleteConfiguredPools() error
- func DeleteDeployment(name string, namespace string) error
- func DeleteDiskPartitions(addr string, count int, diskPath string) error
- func DeleteFioFile(podName string, filename string) ([]byte, error)
- func DeleteKubernetesSecret(secret string, namespace string) error
- func DeleteMayastorPodOnNode(nodeIP string, prefix string) error
- func DeleteMsv(volName string) error
- func DeletePVC(volName string, nameSpace string) error
- func DeletePod(podName string, nameSpace string) error
- func DeletePodsByLabel(label string, nameSpace string) error
- func DeletePvc(volName string, namespace string, errBuf *error, wg *sync.WaitGroup)
- func DeleteRestartedPods(namespace string) error
- func DeleteScVolumeAndFio(scFioVolumeName ScFioVolumeName) error
- func DeleteSnapshot(snapshotName string, namespace string) error
- func DeleteSnapshotClass(snapshotClassName string) error
- func DeleteSnapshotContent(snapshotContentName string) error
- func DeleteStatefulset(name string, namespace string) error
- func DeleteVolumeAttachments(nodeName string) error
- func DeployBusyBoxPod(podName, pvcName string, volType common.VolumeType) error
- func DeploymentReady(deploymentName, namespace string) bool
- func DeploymentReadyCount(deploymentName string, namespace string) (int, error)
- func DisableNetworkInterfaceOnNode(node string) error
- func DisableRdmaOnNode(node string) error
- func DiscoverProduct() (string, error)
- func DsSetContainerEnv(dsName string, nameSpace string, containerName string, envName string, ...) (bool, error)
- func DsUnsetContainerEnv(dsName string, nameSpace string, containerName string, envName string) (bool, error)
- func DsUpdateStrategy(dsName string, nameSpace string, rollingUpdate bool) error
- func DumpPodLog(podName string, nameSpace string)
- func EnableNetworkInterfaceOnNode(node string) error
- func EnableRdmaDeviceOnAllWorkerNodes() error
- func EnableRdmaOnNode(node string) error
- func EnsureE2EAgent() (bool, error)
- func EnsureNamespace(nameSpace string) error
- func EnsureNodeLabelValues(IOEngineLabelKey string, IOEngineLabelValue string, ...) error
- func EnsureNodeLabels() error
- func ExcludeNexusReplica(nexusIP string, nexusUuid string, volUuid string) (bool, error)
- func ExecuteCommandInContainer(namespace string, podName string, containerName string, cmd string) (string, string, error)
- func ExecuteCommandInPod(namespace, podName string, cmd string) (string, string, error)
- func FaultReplica(volumeUuid string, replicaUuid string) error
- func ForceDeleteMayastorPods() (bool, int, error)
- func ForceDeleteTerminatingPods(labels, namespace string) error
- func FsConsistentReplica(initiatorIP, targetIP, nqn string, maxRetries int, nexusNodeNqn string, ...) (string, error)
- func FsFreezeReplica(nodeName string) (string, error)
- func FsUnfreezeReplica(nodeName string) (string, error)
- func GenerateAppPodLogs(token string)
- func GenerateInstallSupportBundle()
- func GenerateMetaJson() error
- func GenerateSupportBundle(testLogDir string)
- func GetCapacityAllReplicasOnPool(poolName string) (int64, error)
- func GetCapacityAndAllocatedAllSnapshotsAllReplicasOnPool(poolName string) (int64, error)
- func GetConfigMap(name string, nameSpace string) (*v1.ConfigMap, error)
- func GetConfiguredClusterNodePoolDevices() (map[string][]string, error)
- func GetConfiguredNodePoolDevices(nodeName string) ([]string, error)
- func GetCoreAgentNodeName() (string, error)
- func GetCsiNode(nodeName string) (*storageV1.CSINode, error)
- func GetCsiNodeDriverTopologyKeys(nodeName string, driverName string) ([]string, error)
- func GetDaemonSet(name, namespace string) (v1.DaemonSet, error)
- func GetDeployment(deploymentName string, namespace string) (*appsv1.Deployment, error)
- func GetDeploymentPods(deploymentName string, namespace string) (*coreV1.PodList, error)
- func GetDeploymentReplicaCount(deploymentName string, namespace string) (int32, error)
- func GetDeploymentSpecReplicas(deploymentName string, namespace string) (int32, error)
- func GetDeploymentStatusReplicas(deploymentName string, namespace string) (int32, error)
- func GetDevLinkName(node, iface string) (string, error)
- func GetEvent(nameSpace string, name string, getOptions metaV1.GetOptions) (*v1.Event, error)
- func GetEvents(nameSpace string, listOptions metaV1.ListOptions) (*v1.EventList, error)
- func GetIOEngineHostNameLabel() (string, error)
- func GetIOEngineNodeLocsMap() (map[string]IOEngineNodeLocation, error)
- func GetInstalledProductChartVersionViaHelm(namespace string) (string, error)
- func GetKubernetesSecret(secret string, namespace string) error
- func GetLease(name, ns string) (*coordinationV1.Lease, error)
- func GetMSN(nodeName string) (*common.MayastorNode, error)
- func GetMSV(uuid string) (*common.MayastorVolume, error)
- func GetMayastorInitialPodCount() int
- func GetMayastorNodeIPAddresses() []string
- func GetMayastorNodeNames() ([]string, error)
- func GetMayastorPodNameonNodeByPrefix(prefix string, nodeName string) (string, error)
- func GetMayastorSnapshotScMap() ([]string, error)
- func GetMsNodeStatus(nodeName string) (string, error)
- func GetMsPool(poolName string) (*common.MayastorPool, error)
- func GetMsvDeviceUri(uuid string) (string, error)
- func GetMsvMaxSnapshotCount(uuid string) (int32, error)
- func GetMsvNexusChildren(volName string) ([]common.TargetChild, error)
- func GetMsvNexusState(uuid string) (string, error)
- func GetMsvNodes(uuid string) (string, []string)
- func GetMsvReplicaTopology(volUuid string) (common.ReplicaTopology, error)
- func GetMsvReplicas(volName string) ([]common.MsvReplica, error)
- func GetMsvSize(uuid string) (int64, error)
- func GetMsvState(uuid string) (string, error)
- func GetMsvTargetNode(uuid string) (string, error)
- func GetNamespace(namespace string) error
- func GetNexusNode(vol_uuid string) (string, error)
- func GetNexusNodeIp(vol_uuid string) (string, error)
- func GetNexusUuid(vol_uuid string) (string, error)
- func GetNodeExtIPAddress(nodeName string) (*string, error)
- func GetNodeForPodByPrefix(prefix string, namespace string) (string, error)
- func GetNodeIPAddress(nodeName string) (*string, error)
- func GetNodeListForPods(labels, namespace string) (map[string]v1.PodPhase, error)
- func GetNodeName(nodeIp string) (*string, error)
- func GetNodeNameForScheduledPod(podName, nameSpace string) (string, error)
- func GetNodeNqn(nodeIp string) (string, error)
- func GetPV(volName string) (*coreV1.PersistentVolume, error)
- func GetPVC(volName string, nameSpace string) (*coreV1.PersistentVolumeClaim, error)
- func GetPod(name, ns string) (*v1.Pod, error)
- func GetPodAddress(podName string, nameSpace string) (string, error)
- func GetPodEvents(podName string, namespace string) (*coreV1.EventList, error)
- func GetPodHostIp(podName string, nameSpace string) (string, error)
- func GetPodLog(podName string, nameSpace string) ([]string, error)
- func GetPodRestartCount(podName string, nameSpace string) (int32, error)
- func GetPodScheduledStatus(podName string, nameSpace string) (coreV1.ConditionStatus, string, error)
- func GetPodStatus(podName string, nameSpace string) (coreV1.PodPhase, error)
- func GetPodStatusByPrefix(prefix string, namespace string) (coreV1.PodPhase, error)
- func GetPoolSizeFraction(pool common.MayastorPool, percentCapacity float64, unit string) int
- func GetPoolUsageInCluster() (uint64, error)
- func GetPvCapacity(pvName string) (*resource.Quantity, error)
- func GetPvStatusPhase(volname string) (phase coreV1.PersistentVolumePhase, err error)
- func GetPvcCapacity(volname string, namespace string) (*resource.Quantity, error)
- func GetPvcEvents(pvcName string, namespace string) (*coreV1.EventList, error)
- func GetPvcStatusPhase(volname string, nameSpace string) (phase coreV1.PersistentVolumeClaimPhase, err error)
- func GetReplicaState(volumeUuid string, replicaUuid string) (string, error)
- func GetReplicaTopoloy(volUuid string, replicaUuid string) (common.Replica, error)
- func GetServiceIp(serviceName string, nameSpace string) (string, error)
- func GetSizePerUnits(b uint64, unit string) float64
- func GetSnapshot(snapshotName string, namespace string) (*snapshotv1.VolumeSnapshot, error)
- func GetSnapshotBoundContentName(snapshotName string, namespace string) (string, error)
- func GetSnapshotClass(snapshotClassName string) (*snapshotv1.VolumeSnapshotClass, error)
- func GetSnapshotContent(snapshotContentName string) (*snapshotv1.VolumeSnapshotContent, error)
- func GetSnapshotContentAnnotation(snapshotContentName string) (map[string]string, error)
- func GetSnapshotContentReadyStatus(snapshotContentName string) (bool, *snapshotv1.VolumeSnapshotError, error)
- func GetSnapshotCpCloneReadyStatus(snapshotUid string, volUuid string) (bool, error)
- func GetSnapshotCpReplicaSnapshots(snapshotUid string, volUuid string) ([]common.ReplicaSnapshot, error)
- func GetSnapshotCpRestoreSize(snapshotUid string, volUuid string) (int64, error)
- func GetSnapshotCpTimestamp(snapshotUid string, volUuid string) (string, error)
- func GetSnapshotCreationTime(snapshotName string, namespace string) (string, error)
- func GetSnapshotCreationTimeStamp(snapshotName string, namespace string) (string, error)
- func GetSnapshotReadyStatus(snapshotName string, namespace string) (bool, *snapshotv1.VolumeSnapshotError, error)
- func GetSnapshotRestoreSize(snapshotName string, namespace string) (*resource.Quantity, error)
- func GetSnapshotUid(snapshotName string, namespace string) (string, error)
- func GetStsSpecReplicas(statefulSetName string, namespace string) (int32, error)
- func GetStsStatusReplicas(statefulSetName string, namespace string) (int32, error)
- func GetSystemNamespaceUuid() (string, error)
- func GetVolumeProtocol(volUuid string) (string, error)
- func GetVolumeReplicasChecksum(volName string, ns string) ([]string, error)
- func GetVolumeSnapshotChecksum(volUuid string, snapshotName string, ns string) ([]string, error)
- func GetVolumeSnapshotFsCheck(volUuid string, snapshotName string, ns string, fsType common.FileSystemType) ([]string, error)
- func HelmGetValues(releaseName string, namespace string) ([]byte, error)
- func HelmUpgradeChartfromYaml(helmChart string, namespace string, releaseName string, ...) (string, error)
- func InstallHelmChart(helmChart, version, namespace, releaseName string, ...) error
- func IsMsvDeleted(uuid string) bool
- func IsMsvPublished(uuid string) bool
- func IsNodeReady(nodeName string, node *v1.Node) (bool, error)
- func IsNormalPvcEventPresent(pvcName string, namespace string, errorSubstring string) (bool, error)
- func IsPVCDeleted(volName string, nameSpace string) (bool, error)
- func IsPVDeleted(volName string) (bool, error)
- func IsPodRunning(podName string, nameSpace string) bool
- func IsPodWithLabelsRunning(labels, namespace string) (string, bool, error)
- func IsPvcBound(pvcName string, nameSpace string) (bool, error)
- func IsSnapshotContentDeleted(snapshotContentName string) (bool, error)
- func IsSnapshotDeleted(snapshotName string, namespace string) (bool, error)
- func IsVolumeAccessibleOverRdma(volUuid string) (bool, error)
- func IsVolumeAccessibleOverTcp(volUuid string) (bool, error)
- func KillPV(pvName string) error
- func KubeCtlApplyYaml(filename string, dir string) error
- func KubeCtlDeleteYaml(filename string, dir string) error
- func LabelNode(nodename string, label string, value string) error
- func ListAllNonMsnNodes() (*v1.NodeList, error)
- func ListControlAndDataPlanePods() (*coreV1.PodList, *coreV1.PodList, error)
- func ListDaemonSet(namespace string) (v1.DaemonSetList, error)
- func ListIOEngineNodes() (*v1.NodeList, error)
- func ListIOEnginePods() (*v1.PodList, error)
- func ListMsPools() ([]common.MayastorPool, error)
- func ListMsns() ([]common.MayastorNode, error)
- func ListMsvs() ([]common.MayastorVolume, error)
- func ListNexusesInCluster() ([]mayastorclient.MayastorNexus, error)
- func ListNodesWithoutNoScheduleTaint() ([]string, error)
- func ListNvmeControllersInCluster() ([]mayastorclient.NvmeController, error)
- func ListPVCs(nameSpace string) (*coreV1.PersistentVolumeClaimList, error)
- func ListPod(ns string) (*v1.PodList, error)
- func ListPodsByPrefix(ns string, prefix string) ([]coreV1.Pod, error)
- func ListPodsWithLabel(namespace string, labels map[string]string) (*v1.PodList, error)
- func ListPoolsInCluster() ([]mayastorclient.MayastorPool, error)
- func ListReplicasInCluster() ([]mayastorclient.MayastorReplica, error)
- func ListRunningMayastorPods(timestamp *time.Time) ([]string, error)
- func ListRunningMayastorPodsOnNode(nodeName string) ([]string, error)
- func ListSnapshot(namespace string) (*snapshotv1.VolumeSnapshotList, error)
- func ListSnapshotClass() (*snapshotv1.VolumeSnapshotClassList, error)
- func ListSnapshotContent() (*snapshotv1.VolumeSnapshotContentList, error)
- func MakeFioContainer(name string, args []string) coreV1.Container
- func MakePVC(volSizeMb int, volName string, scName string, volType common.VolumeType, ...) (string, error)
- func MakeSnapshot(pvcName string, snapshotClassName string, nameSpace string, ...) (*snapshotv1.VolumeSnapshot, string, error)
- func MayastorNodesReady(sleepTime int, duration int) (bool, error)
- func MayastorReady(sleepTime int, duration int) (bool, error)
- func MayastorUndeletedPodCount() int
- func MkNamespace(nameSpace string) error
- func MkPVC(volSizeMb int, volName string, scName string, volType common.VolumeType, ...) (string, error)deprecated
- func MkRestorePVC(pvcSizeMb int, pvcName string, scName string, nameSpace string, ...) (string, error)
- func MkStorageClass(scName string, scReplicas int, protocol common.ShareProto, nameSpace string) error
- func MonitorE2EFioPod(podName string, nameSpace string) (*common.E2eFioPodOutputMonitor, error)
- func MsvConsistencyCheck(uuid string) error
- func NewContainer(opts ...OptionFunc) corev1.Container
- func OpenEBSReady(sleepTime int, duration int) (bool, error)
- func PVCCreateAndFailCordon(volSizeMb int, volName string, scName string, volType common.VolumeType, ...) error
- func PodPresentOnNode(prefix string, namespace string, nodeName string) (bool, error)
- func PodReadyCheck(namespace string) (bool, error)
- func ReadyCheck(namespace string) (bool, error)
- func RefreshPvcToGetPvName(pvcName string, nameSpace string) (string, error)
- func RemoveAllNodeSelectorsFromDaemonset(daemonsetName string, namespace string) error
- func RemoveAllNodeSelectorsFromDeployment(deploymentName string, namespace string) error
- func RemoveConfiguredLoopDeviceOnNode(node string, device e2e_agent.LoopDevice) error
- func RemoveConfiguredLoopDeviceOnNodes(nodeDeviceMap map[string]e2e_agent.LoopDevice) error
- func RemoveControlNodeNoScheduleTaintFromNode(nodeName string) error
- func RemoveHelmRepository(helmRepoName, helmRepoUrl string) error
- func RemoveNoScheduleTaintFromNode(nodeName string) error
- func RemovePVC(volName string, scName string, nameSpace string, local bool) error
- func RemovePVFinalizer(pvName string) error
- func RemoveRdmaDeviceOnAllWorkerNodes() error
- func RemoveRdmaDeviceOnNode(node string) error
- func RemoveSnapshot(snapshotName string, namespace string) error
- func RemoveSnapshotContentAnnotation(snapshotContentName string) error
- func ReplaceConfigMapData(name string, nameSpace string, data map[string]string) error
- func ResourceCheck(waitForPools bool) error
- func ResourceK8sCheck() error
- func RestartMayastor(restartTOSecs int, readyTOSecs int, poolsTOSecs int) error
- func RestartMayastorPods(timeoutSecs int) error
- func RestartMayastorPodsOnNode(restartTOSecs int, readyTOSecs int, poolsTOSecs int, nodeName string) error
- func RestartPodByPrefix(prefix string) error
- func RestoreConfiguredPools() error
- func RestoreDeploymentReplicas(deploymentName string, namespace string, timeout_seconds int, ...) error
- func RestrictMayastorToSingleNode() (string, []string, error)
- func RmNamespace(nameSpace string) error
- func RmPVC(volName string, scName string, nameSpace string) errordeprecated
- func RmReplicasInCluster() error
- func RmStorageClass(scName string) error
- func RunFio(podName string, duration int, filename string, sizeMb int, args ...string) ([]byte, error)
- func SaveHelmValues(releaseName string, namespace string, filePath string) error
- func ScaleCsiDeployment(replication int32) error
- func ScanFioPodLogs(pod v1.Pod, synopsisIn *common.E2eFioPodLogSynopsis) *common.E2eFioPodLogSynopsis
- func ScanFioPodLogsByName(podName string, nameSpace string) (*common.E2eFioPodLogSynopsis, error)
- func SetAllContainerArgs(deploymentName string, containerName string, namespace string, args []string) error
- func SetContainerArgs(deploymentName string, containerName string, namespace string, argKey string, ...) ([]string, error)
- func SetDeploymentReplication(deploymentName string, namespace string, replicas *int32) error
- func SetMayastorInitialPodCount(count int)
- func SetMsvReplicaCount(uuid string, replicaCount int) error
- func SetNexusRebuildVerify(on bool, daemonSetName string) error
- func SetPromtailTolerations(tolerations []coreV1.Toleration, promtailDsName string, namespace string) error
- func SetReplication(appLabel string, namespace string, replicas *int32) error
- func SetStatefulsetReplication(statefulsetName string, namespace string, replicas *int32) error
- func SetupControlNode(excludeLabels []string, testControlNodeLabel string) (bool, error)
- func SetupK8sEnv() error
- func SetupK8sEnvBasic() error
- func SetupK8sLib() error
- func SetupPostgresEnvironment() ([]coreV1.Node, error)
- func ShareReplica(poolId string, replicaUuid string) (string, error)
- func StatefulSetReady(statefulSetName string, namespace string) bool
- func StsExists(statefulSetName string, namespace string) (bool, error)
- func SuppressMayastorPodOnNode(nodeName string, timeout int) error
- func TeardownTestEnv() error
- func TeardownTestEnvNoCleanup() error
- func TryMkOversizedPVC(volSizeMb int, volName string, scName string, volType common.VolumeType, ...) (bool, error)
- func UnShareReplica(poolId string, replicaUuid string) error
- func UninstallE2eAgent() error
- func UninstallHelmRelease(releaseName, namespace string) error
- func UnlabelNode(nodename string, label string) error
- func UnscheduleIoEngineFromNode(nodeIP string, nodeName string, podPrefix string, timeoutSecs int) error
- func UnsuppressMayastorPodOnNode(nodeName string, timeout int) error
- func UpdateDaemonSet(ds appsV1.DaemonSet, namespace string) (v1.DaemonSet, error)
- func UpdateDemonsetContainerAllEnv(daemonsetName string, containerName string, namespace string, ...) error
- func UpdateDemonsetContainerEnv(daemonsetName string, containerName string, namespace string, envName string, ...) ([]coreV1.EnvVar, error)
- func UpdateDeploymentReplica(deployName string, namespace string, replica int32) error
- func UpdateHelmRepository(helmRepoName string) error
- func UpdateNodeTaints(nodeName string, taintKey string) error
- func UpdatePVC(pvc *coreV1.PersistentVolumeClaim, nameSpace string) (*coreV1.PersistentVolumeClaim, error)
- func UpdatePvcSize(pvcName string, namespace string, volSizeMb int) (*coreV1.PersistentVolumeClaim, error)
- func UpgradeHelmChart(helmChart, namespace, releaseName, version string, ...) ([]byte, error)
- func UpgradeHelmChartForValues(helmChart, namespace, releaseName string, values map[string]interface{}) error
- func VerifyDeploymentReadyReplicaCount(name, namespace string, expectedReplicas int) (bool, error)
- func VerifyIoEnginePodCreationOnNode(nodeIP string, podPrefix string, timeoutSecs int) bool
- func VerifyIoEnginePodDeletionFromNode(nodeIP string, podPrefix string, timeoutSecs int) bool
- func VerifyMayastorAndPoolReady(timeoutSecs int) (bool, error)
- func VerifyMayastorPvcIsUsable(pvc *coreV1.PersistentVolumeClaim) error
- func VerifyMayastorVolumeProvision(pvcName string, namespace string) (string, error)
- func VerifyPodStatusWithAppLabel(podLabel string, namespace string) (bool, error)
- func VerifyPodsOnNode(podLabelsList []string, nodeName string, namespace string) error
- func VerifyPvcCreateAndFail(volSizeMb int, volName string, scName string, volType common.VolumeType, ...) error
- func VerifyVolumeProvision(pvcName string, namespace string) (string, error)
- func VolumeComparePreFlightChecks(volUuid string, volTyp common.VolumeType, volName string, waitSecs uint) error
- func WaitFioPodComplete(podName string, sleepTimeSecs, timeoutSecs int) error
- func WaitForDeploymentReady(deploymentName string, namespace string, sleepTime int, duration int) bool
- func WaitForDeploymentToMatchExpectedState(deployName string, namespace string, expectedReplica int) (bool, error)
- func WaitForMCPPath(timeout string) error
- func WaitForMayastorSockets(addrs []string, timeout string) error
- func WaitForMayastorVolumeToProvision(msvName string) (*common.MayastorVolume, error)
- func WaitForPodAbsentFromNode(podNameRegexp string, namespace string, nodeName string, timeoutSeconds int) error
- func WaitForPodNotRunningOnNode(podNameRegexp string, namespace string, nodeName string, timeoutSeconds int) error
- func WaitForPodRunning(podNameRegexp string, namespace string, timeoutSeconds int) error
- func WaitForPodRunningOnNode(podNameRegexp string, namespace string, nodeName string, timeoutSeconds int) error
- func WaitForPoolsToBeOnline(timeoutSeconds int) error
- func WaitForPvToProvision(pvName string) error
- func WaitForPvcNormalEvent(pvcName string, namespace string, errorSubstring string) (bool, error)
- func WaitPodComplete(podName string, sleepTimeSecs, timeoutSecs int) error
- func WaitPodRunning(podName string, nameSpace string, timeoutSecs int) bool
- func WaitPvToBound(pvName string) error
- func WaitPvcToBound(pvcName string, nameSpace string) error
- func WipeVolumeReplicas(volUuid string) error
- func XfsCheck(nodeName string, deployName string, containerName string) (string, error)
- func ZapPoolDevices() error
- func ZeroDeploymentReplicas(deploymentName string, namespace string, timeout_seconds int) (int32, error)
- func ZeroNodeHugePages(nodeName string) (string, error)
- type BenchmarkParams
- type Chart
- type ContainerBuilder
- func (b *ContainerBuilder) Build() (corev1.Container, error)
- func (b *ContainerBuilder) WithArgumentsNew(args []string) *ContainerBuilder
- func (b *ContainerBuilder) WithCommandNew(cmd []string) *ContainerBuilder
- func (b *ContainerBuilder) WithEnvs(envs []corev1.EnvVar) *ContainerBuilder
- func (b *ContainerBuilder) WithEnvsNew(envs []corev1.EnvVar) *ContainerBuilder
- func (b *ContainerBuilder) WithImage(img string) *ContainerBuilder
- func (b *ContainerBuilder) WithImagePullPolicy(policy corev1.PullPolicy) *ContainerBuilder
- func (b *ContainerBuilder) WithLifeCycle(lc *corev1.Lifecycle) *ContainerBuilder
- func (b *ContainerBuilder) WithLivenessProbe(liveness *corev1.Probe) *ContainerBuilder
- func (b *ContainerBuilder) WithName(name string) *ContainerBuilder
- func (b *ContainerBuilder) WithPortsNew(ports []corev1.ContainerPort) *ContainerBuilder
- func (b *ContainerBuilder) WithPrivilegedSecurityContext(privileged *bool) *ContainerBuilder
- func (b *ContainerBuilder) WithResources(resources *corev1.ResourceRequirements) *ContainerBuilder
- func (b *ContainerBuilder) WithResourcesByValue(resources corev1.ResourceRequirements) *ContainerBuilder
- func (b *ContainerBuilder) WithVolumeDevice(volumeDevice corev1.VolumeDevice) *ContainerBuilder
- func (b *ContainerBuilder) WithVolumeDeviceOrMount(volName string, volType common.VolumeType) *ContainerBuilder
- func (b *ContainerBuilder) WithVolumeDevices(volumeDevices []corev1.VolumeDevice) *ContainerBuilder
- func (b *ContainerBuilder) WithVolumeMount(volumeMount corev1.VolumeMount) *ContainerBuilder
- func (b *ContainerBuilder) WithVolumeMountsNew(volumeMounts []corev1.VolumeMount) *ContainerBuilder
- type Deployment
- type DeploymentBuilder
- func (b *DeploymentBuilder) Build() (*appsv1.Deployment, error)
- func (b *DeploymentBuilder) WithLabelsNew(labels map[string]string) *DeploymentBuilder
- func (b *DeploymentBuilder) WithName(name string) *DeploymentBuilder
- func (b *DeploymentBuilder) WithNamespace(namespace string) *DeploymentBuilder
- func (b *DeploymentBuilder) WithNodeSelector(selector map[string]string) *DeploymentBuilder
- func (b *DeploymentBuilder) WithNodeSelectorNew(selector map[string]string) *DeploymentBuilder
- func (b *DeploymentBuilder) WithPodTemplateSpecBuilder(tmplbuilder *PodtemplatespecBuilder) *DeploymentBuilder
- func (b *DeploymentBuilder) WithReplicas(replicas *int32) *DeploymentBuilder
- func (b *DeploymentBuilder) WithSelectorMatchLabels(matchlabels map[string]string) *DeploymentBuilder
- func (b *DeploymentBuilder) WithSelectorMatchLabelsNew(matchlabels map[string]string) *DeploymentBuilder
- type FioApp
- func (dfa *FioApp) Cleanup() error
- func (dfa *FioApp) CreateVolume() error
- func (dfa *FioApp) DeletePod() error
- func (dfa *FioApp) DeployApp() error
- func (dfa *FioApp) DeployAppWithArgs(fioArgsSet common.FioAppArgsSet) error
- func (dfa *FioApp) DeployFio(fioArgsSet common.FioAppArgsSet, podPrefix string) error
- func (dfa *FioApp) DumpPodLog()
- func (dfa *FioApp) DumpReplicas()
- func (dfa *FioApp) FioTargetSizes() (map[string]uint64, error)
- func (dfa *FioApp) ForcedCleanup()
- func (dfa *FioApp) GetAppUuid() string
- func (dfa *FioApp) GetPodName() string
- func (dfa *FioApp) GetPodStatus() (coreV1.PodPhase, error)
- func (dfa *FioApp) GetReplicaCount() int
- func (dfa *FioApp) GetScName() string
- func (dfa *FioApp) GetVolName() string
- func (dfa *FioApp) GetVolUuid() string
- func (dfa *FioApp) ImportVolume(volName string) error
- func (dfa *FioApp) ImportVolumeFromApp(srcDfa *FioApp) error
- func (dfa *FioApp) IsPVCCreated() bool
- func (dfa *FioApp) IsVolumeCreated() bool
- func (dfa *FioApp) MonitorPod() (*common.E2eFioPodOutputMonitor, error)
- func (dfa *FioApp) RefreshDeploymentFioPodName() error
- func (dfa *FioApp) RefreshVolumeState() error
- func (dfa *FioApp) ScaleVolumeReplicas(v int) error
- func (dfa *FioApp) SetAppNodeName(nodeName string) error
- func (dfa *FioApp) SetVolumeReplicaCount(replicaCount int) error
- func (dfa *FioApp) VerifyReplicas() error
- func (dfa *FioApp) WaitComplete(timeoutSecs int) error
- func (dfa *FioApp) WaitDeploymentRunning() (bool, error)
- func (dfa *FioApp) WaitFioComplete(timeoutSecs int, pollTimeSecs int) (int, error)
- func (dfa *FioApp) WaitRunning(timeoutSecs int) bool
- type FioApplication
- func (dfa *FioApplication) Cleanup() error
- func (dfa *FioApplication) CreateSc() error
- func (dfa *FioApplication) CreateVolume() error
- func (dfa *FioApplication) DeletePod() error
- func (dfa *FioApplication) DeployAppWithArgs(fioArgsSet common.FioAppArgsSet) error
- func (dfa *FioApplication) DeployApplication() error
- func (dfa *FioApplication) DeployFio(fioArgsSet common.FioAppArgsSet, podPrefix string) error
- func (dfa *FioApplication) DumpPodLog()
- func (dfa *FioApplication) FioTargetSizes() (map[string]uint64, error)
- func (dfa *FioApplication) ForcedCleanup()
- func (dfa *FioApplication) GetAppUuid() string
- func (dfa *FioApplication) GetPodName() string
- func (dfa *FioApplication) GetPodStatus() (coreV1.PodPhase, error)
- func (dfa *FioApplication) GetPvcName() string
- func (dfa *FioApplication) GetScName() string
- func (dfa *FioApplication) ImportVolume(volName string) error
- func (dfa *FioApplication) ImportVolumeFromApp(srcDfa *FioApplication) error
- func (dfa *FioApplication) IsPVCCreated() bool
- func (dfa *FioApplication) MonitorPod() (*common.E2eFioPodOutputMonitor, error)
- func (dfa *FioApplication) RefreshVolumeState() error
- func (dfa *FioApplication) SetAppNodeName(nodeName string) error
- func (dfa *FioApplication) WaitComplete(timeoutSecs int) error
- func (dfa *FioApplication) WaitFioComplete(timeoutSecs int, pollTimeSecs int) (int, error)
- func (dfa *FioApplication) WaitRunning(timeoutSecs int) bool
- type FioApplicationStatus
- type FioStsApp
- type HostPathOptions
- type IOEngineNodeLocation
- type LvmOptions
- type MongoApp
- type NodeLocation
- type OptionFunc
- type PgBenchApp
- type PgBenchAppBuilder
- func (b *PgBenchAppBuilder) Build() *PgBenchApp
- func (b *PgBenchAppBuilder) WithBenchmarkParams(params PgBenchmarkParams) *PgBenchAppBuilder
- func (b *PgBenchAppBuilder) WithName(name string) *PgBenchAppBuilder
- func (b *PgBenchAppBuilder) WithNamespace(namespace string) *PgBenchAppBuilder
- func (b *PgBenchAppBuilder) WithNodeSelector(nodeSelector string) *PgBenchAppBuilder
- type PgBenchmarkParams
- type Pod
- type PodBuilder
- func (b *PodBuilder) Build() (*corev1.Pod, error)
- func (b *PodBuilder) WithContainer(container corev1.Container) *PodBuilder
- func (b *PodBuilder) WithContainers(containers []corev1.Container) *PodBuilder
- func (b *PodBuilder) WithHostPath(name string, hostPath string) *PodBuilder
- func (b *PodBuilder) WithLabels(labels map[string]string) *PodBuilder
- func (b *PodBuilder) WithMountReadOnly(rdOnly bool) *PodBuilder
- func (b *PodBuilder) WithName(name string) *PodBuilder
- func (b *PodBuilder) WithNamespace(namespace string) *PodBuilder
- func (b *PodBuilder) WithNodeName(nodeName string) *PodBuilder
- func (b *PodBuilder) WithNodeSelectorHostnameNew(hostname string) *PodBuilder
- func (b *PodBuilder) WithRestartPolicy(restartPolicy corev1.RestartPolicy) *PodBuilder
- func (b *PodBuilder) WithServiceAccountName(serviceAccountName string) *PodBuilder
- func (b *PodBuilder) WithTolerationsForTaints(taints ...corev1.Taint) *PodBuilder
- func (b *PodBuilder) WithVolume(volume corev1.Volume) *PodBuilder
- func (b *PodBuilder) WithVolumeDevice(volDevice corev1.VolumeDevice) *PodBuilder
- func (b *PodBuilder) WithVolumeDeviceOrMount(volType common.VolumeType) *PodBuilder
- func (b *PodBuilder) WithVolumeDevices(volDevices []corev1.VolumeDevice) *PodBuilder
- func (b *PodBuilder) WithVolumeMount(volMount corev1.VolumeMount) *PodBuilder
- func (b *PodBuilder) WithVolumeMounts(volMounts []corev1.VolumeMount) *PodBuilder
- func (b *PodBuilder) WithVolumes(volumes []corev1.Volume) *PodBuilder
- type PodTemplateSpec
- type PodtemplatespecBuilder
- func (b *PodtemplatespecBuilder) Build() (*PodTemplateSpec, error)
- func (b *PodtemplatespecBuilder) WithAffinity(affinity *corev1.Affinity) *PodtemplatespecBuilder
- func (b *PodtemplatespecBuilder) WithAnnotations(annotations map[string]string) *PodtemplatespecBuilder
- func (b *PodtemplatespecBuilder) WithAnnotationsNew(annotations map[string]string) *PodtemplatespecBuilder
- func (b *PodtemplatespecBuilder) WithContainerBuilders(containerBuilderList ...*ContainerBuilder) *PodtemplatespecBuilder
- func (b *PodtemplatespecBuilder) WithContainerBuildersNew(containerBuilderList ...*ContainerBuilder) *PodtemplatespecBuilder
- func (b *PodtemplatespecBuilder) WithLabels(labels map[string]string) *PodtemplatespecBuilder
- func (b *PodtemplatespecBuilder) WithLabelsNew(labels map[string]string) *PodtemplatespecBuilder
- func (b *PodtemplatespecBuilder) WithName(name string) *PodtemplatespecBuilder
- func (b *PodtemplatespecBuilder) WithNamespace(namespace string) *PodtemplatespecBuilder
- func (b *PodtemplatespecBuilder) WithNodeSelector(nodeselectors map[string]string) *PodtemplatespecBuilder
- func (b *PodtemplatespecBuilder) WithNodeSelectorByValue(nodeselectors map[string]string) *PodtemplatespecBuilder
- func (b *PodtemplatespecBuilder) WithNodeSelectorNew(nodeselectors map[string]string) *PodtemplatespecBuilder
- func (b *PodtemplatespecBuilder) WithPriorityClassName(prorityClassName string) *PodtemplatespecBuilder
- func (b *PodtemplatespecBuilder) WithServiceAccountName(serviceAccountnNme string) *PodtemplatespecBuilder
- func (b *PodtemplatespecBuilder) WithTolerations(tolerations ...corev1.Toleration) *PodtemplatespecBuilder
- func (b *PodtemplatespecBuilder) WithTolerationsByValue(tolerations ...corev1.Toleration) *PodtemplatespecBuilder
- func (b *PodtemplatespecBuilder) WithTolerationsNew(tolerations ...corev1.Toleration) *PodtemplatespecBuilder
- func (b *PodtemplatespecBuilder) WithVolumeBuilders(volumeBuilderList ...*VolumeBuilder) *PodtemplatespecBuilder
- func (b *PodtemplatespecBuilder) WithVolumeBuildersNew(volumeBuilderList ...*VolumeBuilder) *PodtemplatespecBuilder
- type PortInfo
- type PortMap
- type PostgresApp
- type Pvc
- type PvcBuilder
- func (b *PvcBuilder) Build() (*coreV1.PersistentVolumeClaim, error)
- func (b *PvcBuilder) BuildAndCreate() error
- func (b *PvcBuilder) WithAccessModes(mode coreV1.PersistentVolumeAccessMode) *PvcBuilder
- func (b *PvcBuilder) WithDataSourceApiGroup(dataSourceApiGroup string) *PvcBuilder
- func (b *PvcBuilder) WithDataSourceKind(dataSourceKind string) *PvcBuilder
- func (b *PvcBuilder) WithDataSourceName(dataSourceName string) *PvcBuilder
- func (b *PvcBuilder) WithName(name string) *PvcBuilder
- func (b *PvcBuilder) WithNamespace(namespace string) *PvcBuilder
- func (b *PvcBuilder) WithPvcSize(size string) *PvcBuilder
- func (b *PvcBuilder) WithStorageClass(scName string) *PvcBuilder
- func (b *PvcBuilder) WithVolumeMode(volType common.VolumeType) *PvcBuilder
- type RdmaDeviceNetworkInterface
- type ReplicaMount
- type ReplicaMountSpec
- type ReplicaMountStatus
- type ScBuilder
- func (b *ScBuilder) Build() (*storagev1.StorageClass, error)
- func (b *ScBuilder) BuildAndCreate() error
- func (b *ScBuilder) WithAllowedTopologies(value []v1.TopologySelectorTerm) *ScBuilder
- func (b *ScBuilder) WithAnnotations(annotations map[string]string) *ScBuilder
- func (b *ScBuilder) WithCloneFsIdAsVolumeId(value common.CloneFsIdAsVolumeIdType) *ScBuilder
- func (b *ScBuilder) WithFileSystemType(value common.FileSystemType) *ScBuilder
- func (b *ScBuilder) WithGenerateName(name string) *ScBuilder
- func (b *ScBuilder) WithIOTimeout(value int) *ScBuilder
- func (b *ScBuilder) WithLvmShared(value string) *ScBuilder
- func (b *ScBuilder) WithLvmStorage(value string) *ScBuilder
- func (b *ScBuilder) WithLvmThinVol(val string) *ScBuilder
- func (b *ScBuilder) WithLvmVgPattern(value string) *ScBuilder
- func (b *ScBuilder) WithLvmVolGroup(value string) *ScBuilder
- func (b *ScBuilder) WithMaxSnapshots(value int) *ScBuilder
- func (b *ScBuilder) WithMountOption(option string) *ScBuilder
- func (b *ScBuilder) WithMountOptions(options []string) *ScBuilder
- func (b *ScBuilder) WithName(name string) *ScBuilder
- func (b *ScBuilder) WithNamespace(ns string) *ScBuilder
- func (b *ScBuilder) WithNodeAffinityTopologyLabel(topology map[string]string) *ScBuilder
- func (b *ScBuilder) WithNodeHasTopologyKey(topologyKey string) *ScBuilder
- func (b *ScBuilder) WithNodeSpreadTopologyKey(topologyKey string) *ScBuilder
- func (b *ScBuilder) WithNvmeCtrlLossTmo(value int) *ScBuilder
- func (b *ScBuilder) WithPoolAffinityTopologyLabel(topology map[string]string) *ScBuilder
- func (b *ScBuilder) WithPoolHasTopologyKey(topologyKey string) *ScBuilder
- func (b *ScBuilder) WithProtocol(value common.ShareProto) *ScBuilder
- func (b *ScBuilder) WithProvisioner(provisioner string) *ScBuilder
- func (b *ScBuilder) WithProvisioningType(provisioningType common.ProvisioningType) *ScBuilder
- func (b *ScBuilder) WithReclaimPolicy(reclaimPolicy v1.PersistentVolumeReclaimPolicy) *ScBuilder
- func (b *ScBuilder) WithReplicas(value int) *ScBuilder
- func (b *ScBuilder) WithStsAffinityGroup(stsAffinity common.StsAffinityGroup) *ScBuilder
- func (b *ScBuilder) WithVolumeBindingMode(bindingMode storagev1.VolumeBindingMode) *ScBuilder
- func (b *ScBuilder) WithVolumeExpansion(value common.AllowVolumeExpansion) *ScBuilder
- func (b *ScBuilder) WithZfsCompression(value string) *ScBuilder
- func (b *ScBuilder) WithZfsDeDUp(value string) *ScBuilder
- func (b *ScBuilder) WithZfsPoolName(value string) *ScBuilder
- func (b *ScBuilder) WithZfsRecordSize(value string) *ScBuilder
- func (b *ScBuilder) WithZfsShared(value string) *ScBuilder
- func (b *ScBuilder) WithZfsThinVol(val string) *ScBuilder
- type ScFioVolumeName
- type Statefulset
- type StatefulsetBuilder
- func (b *StatefulsetBuilder) Build() (*appsv1.StatefulSet, error)
- func (b *StatefulsetBuilder) WithLabels(labels map[string]string) *StatefulsetBuilder
- func (b *StatefulsetBuilder) WithName(name string) *StatefulsetBuilder
- func (b *StatefulsetBuilder) WithNamespace(namespace string) *StatefulsetBuilder
- func (b *StatefulsetBuilder) WithNodeSelector(selector map[string]string) *StatefulsetBuilder
- func (b *StatefulsetBuilder) WithPodManagementPolicy(policy appsv1.PodManagementPolicyType) *StatefulsetBuilder
- func (b *StatefulsetBuilder) WithPodTemplateSpecBuilder(tmplbuilder *PodtemplatespecBuilder) *StatefulsetBuilder
- func (b *StatefulsetBuilder) WithReplicas(replicas *int32) *StatefulsetBuilder
- func (b *StatefulsetBuilder) WithSelectorMatchLabels(matchlabels map[string]string) *StatefulsetBuilder
- func (b *StatefulsetBuilder) WithVolumeClaimTemplate(name, storage, storageClassName string, volType common.VolumeType) *StatefulsetBuilder
- type StorageClass
- type TestEnvironment
- type Volume
- type VolumeBuilder
- func (b *VolumeBuilder) Build() (*corev1.Volume, error)
- func (b *VolumeBuilder) WithConfigMap(configMap *corev1.ConfigMap, defaultMode int32) *VolumeBuilder
- func (b *VolumeBuilder) WithEmptyDir(dir *corev1.EmptyDirVolumeSource) *VolumeBuilder
- func (b *VolumeBuilder) WithHostDirectory(path string) *VolumeBuilder
- func (b *VolumeBuilder) WithHostPathAndType(dirpath string, dirtype *corev1.HostPathType) *VolumeBuilder
- func (b *VolumeBuilder) WithName(name string) *VolumeBuilder
- func (b *VolumeBuilder) WithPVCSource(pvcName string) *VolumeBuilder
- func (b *VolumeBuilder) WithSecret(secret *corev1.Secret, defaultMode int32) *VolumeBuilder
- type YcsbApp
- type ZfsOptions
Constants ¶
const (
DefCompletionTimeout = 600
)
const ( // k8sNodeLabelKeyHostname is the label key used by Kubernetes // to store the hostname on the node resource. K8sNodeLabelKeyHostname = "kubernetes.io/hostname" )
const RdmaDeviceName = "rxe0"
Variables ¶
var ( DefTimeoutSecs = 90 // in seconds DefVerifyReplicaWaitHealthyVolTimeSecs = 120 )
var (
StsDefTimeoutSecs = 90 // in seconds
)
var ZeroInt64 = int64(0)
Functions ¶
func AddHelmRepository ¶
func AddSnapshotContentAnnotation ¶
Add the Volume Snapshot content annotations
func AfterSuiteCleanup ¶
func AfterSuiteCleanup()
AfterSuiteCleanup placeholder function for now To aid postmortem analysis for the most common CI use case namely cluster is retained aon failure, we do nothing For other situations behaviour should be configurable
func ApplyIoEngineLabelToNode ¶
func ApplyIoEngineLabelToNode(nodeIP string, nodeName string, podPrefix string, timeoutSecs int) error
ApplyIoEngineLabelToNode add io engine label and verify pod creation on node
func ApplyNodeSelectorToDaemonset ¶
func ApplyNodeSelectorToDaemonset(daemonsetName string, namespace string, label string, value string) error
ApplyNodeSelectorToDaemonset add node selector to the daemonset spec and apply
func ApplyNodeSelectorToDeployment ¶
func ApplyNodeSelectorToDeployment(deploymentName string, namespace string, label string, value string) error
Add a node selector to the deployment spec and apply
func ApplyNodeSelectorToPodObject ¶
Add a node selector to the given pod definition
func ApplyNodeSelectorToStatefulset ¶
func ApplyNodeSelectorToStatefulset(stsName string, namespace string, label string, value string) error
Add a node selector to the statefuleset spec and apply
func AreNodesReady ¶
func BounceDeployment ¶
set the deployment replication to zero until all pods are removed, then reset to the original value.
func CheckAllMsvsAreHealthy ¶
func CheckAllMsvsAreHealthy() error
func CheckAndSetControlPlane ¶
func CheckAndSetControlPlane() error
CheckAndSetControlPlane checks which deployments exists and sets config control plane setting
func CheckFioPodCompleted ¶
func CheckForMsvs ¶
func CheckForPVCs ¶
func CheckForPVs ¶
func CheckForStorageClasses ¶
func CheckForTestPods ¶
CheckForTestPods Check if any test pods exist in the default and e2e related namespaces .
func CheckIfAllResourcesAreDifferent ¶
CheckIfAllResourcesAreDifferent function can be used to check if all elements passed as arguments in the lists are different. So for e.g. it will be useful in tests where we want to verify that all pools are on different nodes or all nexuses are on different nodes or all replicas have different pools.
func CheckMsPodOnNodeByPrefix ¶
CheckMsPodOnNodeByPrefix check mayastor pod is running on a node with names matching the prefix
func CheckMsvIsDeleted ¶
func CheckPodCompleted ¶
func CheckPodIsRunningByPrefix ¶
CheckPodIsRunningByPrefix check pod is running by prefix name
func CheckReplicaComparisonPossible ¶
func CheckReplicaComparisonPossible(volUuid string, volName string, volType common.VolumeType, timeout int) error
CheckReplicaComparisonPossible given a volume uuid, name, and type attempt to ensure that conditions replica comparison are met. Primarily ensure the the volume is not degraded on return from this function. Volumes should not be published/mounted when this function is called
func CheckTestPodsHealth ¶
CheckTestPodsHealth Check test pods in a namespace for restarts and failed/unknown state
func ChecksumReplica ¶
func ChecksumReplica(initiatorIP, targetIP, nqn string, maxRetries int, nexusNodeNqn string) (string, error)
ChecksumReplica checksums the nvme target defined by the given uri It uses the e2e agent and the nvme client to connect to the target. the returned format is derived from cksum: <checksum> <size> e.g. "924018992 61849088
func CleanUp ¶
func CleanUp() bool
"Big" sweep, attempts to remove artefacts left over in the cluster that would prevent future successful test runs. returns true if cleanup was successful i.e. all resources were deleted and no errors were encountered.
func CleanUpBusyboxResources ¶
func ClearStorageClasses ¶
func ClearStorageClasses()
Install support function - clear any storage classes created by Helm charts
func CompareReplicas ¶
func CompareReplicas(nexusIP string, replica_1_IP string, replica_2_IP string, volUUID string) error
use the e2e-agent running on each non-nexus node:
for each non-nexus replica node nvme connect to its own target cksum /dev/nvme0n1p2 nvme disconnect compare the checksum results, they should match
func CompareVolumeReplicas ¶
func CompareVolumeReplicas(volName string, ns string) common.ReplicasComparison
CompareVolumeReplicas compares contents of all volume replicas returns replicas match, mismatch or failure to compare replica contents
Fails if a nexus is present for more than 120 seconds after invocation of this function. Presence of a nexus implies writes are possible whilst calculating the checksum, also this function amends replica sharing.
This function is intended for use at the end of volume operations, immediately before a volume is deleted.
func ConfigureLoopDeviceOnNodes ¶
func ConfigureLoopDeviceOnNodes(nodeDeviceMap map[string]e2e_agent.LoopDevice) (map[string]e2e_agent.LoopDevice, error)
func ControlPlaneReady ¶
func CreateConfiguredPools ¶
func CreateConfiguredPools() error
CreateConfiguredPools (re)create pools as defined by the configuration. No check is made on the status of pools
func CreateDeployment ¶
func CreateDeployment(obj *appsv1.Deployment) error
CreateDeployment creates deployment with provided deployment object
func CreateDiskPartitions ¶
func CreateDiskPartitionsMib ¶
func CreateDiskPoolsConfiguration ¶
func CreateDiskPoolsConfiguration() error
CreateDiskPoolsConfiguration query mayastor for available devices and create configmap e2e-diskpools-fqn with a map of nodes and pool devices This function is a NOP if the config map is already present to allow external agents to determine the set of pool devices by creating the configmap before this function is invoked
func CreateFioPod ¶
func CreateFioPod(podName string, volName string, volType common.VolumeType, nameSpace string) (*coreV1.Pod, error)
CreateFioPod deprecated use MakeFioContainer, NewPodBuilder and CreatePod instead / Create a test fio pod in default namespace, no options and no context / mayastor volume is mounted on /volume
func CreateFioPodDef ¶
func CreateFioPodDef(podName string, volName string, volType common.VolumeType, nameSpace string) *coreV1.Pod
CreateFioPodDef deprecated use MakeFioContainer and NewPodBuilder instead / Create a test fio pod in default namespace, no options and no context / for filesystem, mayastor volume is mounted on /volume / for raw-block, mayastor volume is mounted on /dev/sdm
func CreateFioPodOnNode ¶
func CreatePVC ¶
func CreatePVC(pvc *coreV1.PersistentVolumeClaim, nameSpace string) (*coreV1.PersistentVolumeClaim, error)
CreatePVC Create a PVC in default namespace, no options and no context
func CreatePoolOnNode ¶
CreatePoolOnNode create pool on a specific node. No check is made on the status of pools
func CreatePoolOnNodeAndWait ¶
func CreateRdmaDeviceOnAllIoEngineNodes ¶
func CreateRdmaDeviceOnAllIoEngineNodes() error
func CreateRdmaDeviceOnNode ¶
func CreateSc ¶
func CreateSc(obj *storagev1.StorageClass) error
CreateSc creates storageclass with provided storageclass object
func CreateSleepingFioPod ¶
func CreateSleepingFioPod(fioPodName string, volName string, volType common.VolumeType) error
CreateSleepingFioPod create fio pod definition and create pod with sleep, it will not run fio
func CreateSleepingFioPodOnNode ¶
func CreateSleepingFioPodOnNode(fioPodName string, volName string, volType common.VolumeType, nodename string) error
CreateSleepingFioPodOnNode create fio pod definition and create pod on given node if node provided otherwise fio will be created on any suitable node with sleep, it will not run fio
func CreateSnapshot ¶
func CreateSnapshot(pvcName string, snapshotClassName string, nameSpace string, snapshotName string) (*snapshotv1.VolumeSnapshot, error)
Create the Volume Snapshot , this will create snapshot kubernetes object only. This will be called by MakeSnapshot function
func CreateSnapshotClass ¶
Create the Snapshot class
func CreateStatefulset ¶
func CreateStatefulset(obj *appsv1.StatefulSet) error
CreateStatefulset creates statefulset with provided statefulset object
func CreateVolumeSnapshot ¶
func CreateVolumeSnapshot(snapshotClassName string, snapshotName string, pvc string, namespace string, csiDriver string) (*v1.VolumeSnapshot, string, error)
CreateVolumeSnapshot create snapshot class and snapshot it return snapshot object , snapshot content name and err
func DaemonSetReady ¶
func DeleteAllDeployments ¶
func DeleteAllMsvs ¶
DeleteAllMsvs Make best attempt to delete MayastorVolumes
func DeleteAllPods ¶
/ Delete all pods in the default namespace
func DeleteAllPools ¶
func DeleteAllPools() bool
func DeleteAllPvcs ¶
Make best attempt to delete PersistentVolumeClaims returns ok -> operations succeeded, resources undeleted, delete resources failed
func DeleteAllSnapshots ¶
Make best attempt to delete Snapshot returns ok -> operations succeeded, resources undeleted, delete resources failed
func DeleteConfigMap ¶
func DeleteConfiguredPools ¶
func DeleteConfiguredPools() error
func DeleteDeployment ¶
DeleteDeployment deletes the deployment
func DeleteDiskPartitions ¶
func DeleteFioFile ¶
DeleteFioFile deletes the file which was created by fio while writing data
func DeleteKubernetesSecret ¶
func DeleteMayastorPodOnNode ¶
DeleteMayastorPodOnNode deletes mayastor pods on a node with names matching the prefix
func DeletePodsByLabel ¶
func DeleteRestartedPods ¶
DeleteRestartedPods utility function to "clear" pods with restart counts use with care - this functions exists because the test framework systematically asserts that pods have not restarted to mark a test as passed. However there are "legitimate" reasons why mayastor pods may have restarted for example when a node has been rebooted this function should be used in such cases in conjunction with the MayastorReady function to ensure that the test cluster is back to "pristine" state.
func DeleteScVolumeAndFio ¶
func DeleteScVolumeAndFio(scFioVolumeName ScFioVolumeName) error
func DeleteSnapshot ¶
Delete the volume Snapshot
func DeleteSnapshotClass ¶
Delete the volume Snapshot class
func DeleteSnapshotContent ¶
Delete the volume Snapshot content
func DeleteStatefulset ¶
DeleteStatefulset deletes the statefulset
func DeleteVolumeAttachments ¶
DeleteVolumeAttachmets deletes volume attachments for a node
func DeployBusyBoxPod ¶
func DeployBusyBoxPod(podName, pvcName string, volType common.VolumeType) error
func DeploymentReady ¶
func DeploymentReadyCount ¶
func DisableNetworkInterfaceOnNode ¶
disable network interface on node
func DisableRdmaOnNode ¶
func DiscoverProduct ¶
DiscoverProduct return the name of the product installed on the test cluster this cannot be used by the product install test This function may be called very early during initialisation of a test ot tool run and should have no dependencies of state
func DsSetContainerEnv ¶
func DsUnsetContainerEnv ¶
func DsUpdateStrategy ¶
DSUpdateStrategy set a daemonset update strategy to rolling update on on delete
func DumpPodLog ¶
func EnableNetworkInterfaceOnNode ¶
enable network interface on node
func EnableRdmaDeviceOnAllWorkerNodes ¶
func EnableRdmaDeviceOnAllWorkerNodes() error
func EnableRdmaOnNode ¶
func EnsureE2EAgent ¶
EnsureE2EAgent ensure that e2e agent daemonSet is running, if already deployed does nothing, otherwise creates the e2e agent namespace and deploys the daemonSet. asserts if creating the namespace fails. This function can be called repeatedly.
func EnsureNamespace ¶
EnsureNamespace ensure that a namespace exists, creates namespace if not found.
func EnsureNodeLabelValues ¶
func EnsureNodeLabelValues(IOEngineLabelKey string, IOEngineLabelValue string, testControlNodeLabel string) error
EnsureNodeLabelValues that existing labels on a node have a particular value
func EnsureNodeLabels ¶
func EnsureNodeLabels() error
EnsureNodeLabels add the label xxxxxxx/engine=mayastor to all worker nodes so that K8s runs mayastor on them returns error is accessing the list of nodes fails.
func ExcludeNexusReplica ¶
ExcludeNexusReplica - ensure the volume has no nexus-local replica This depends on there being an unused mayastor instance available so e.g. a 2-replica volume needs at least a 3-node cluster
func ExecuteCommandInContainer ¶
func ExecuteCommandInContainer(namespace string, podName string, containerName string, cmd string) (string, string, error)
ExecuteCommandInContainer is needed for pods with more than one container
func ExecuteCommandInPod ¶
ExecuteCommandInPod FIXME: Explore how to make the stream interactive and more flexible, etc.
func FaultReplica ¶
Identify the nexus IP address, the uri of the replica , fault replica
func ForceDeleteMayastorPods ¶
Force deletion of all existing mayastor pods returns the number of pods still present, and error
func ForceDeleteTerminatingPods ¶
ForceDeleteTerminatingPods force deletes the pod this function is required because sometimes after powering off the node some pods stuck in terminating state.
func FsConsistentReplica ¶
func FsConsistentReplica(initiatorIP, targetIP, nqn string, maxRetries int, nexusNodeNqn string, fsType common.FileSystemType) (string, error)
FsConsistentReplica verifies the filesystem consistency of the nvme target defined by the given uri. It uses the e2e agent and the nvme client to connect to the target. Returns the fsck or equivalent output and exit status code
func FsFreezeReplica ¶
FsFreezeReplica freezes the filesystem of the nvme target defined by the given uri. It uses the e2e agent and the nvme client to connect to the target. Returns the exit status code
func FsUnfreezeReplica ¶
FsUnfreezeReplica unfreezes the filesystem of the nvme target defined by the given uri. It uses the e2e agent and the nvme client to connect to the target. Returns the exit status code
func GenerateInstallSupportBundle ¶
func GenerateInstallSupportBundle()
GenerateInstallSupportBundle generate a support bundle for the cluster
func GenerateMetaJson ¶
func GenerateMetaJson() error
Create meta.json file with release platform and install bundle details
func GenerateSupportBundle ¶
func GenerateSupportBundle(testLogDir string)
GenerateSupportBundle generate a support bundle for the cluster
func GetCapacityAllReplicasOnPool ¶
GetCapacityAllReplicasOnPool given a poolName, returns totalCapacity of all the replicas on that pool
func GetCapacityAndAllocatedAllSnapshotsAllReplicasOnPool ¶
GetCapacityAndAllocatedAllSnapshotsAllReplicasOnPool given a poolName, returns totalCapacity which is sum of capacity of all the replicas on that pool and AllocatedAllSnapshots of all replicas on that pool
func GetConfiguredClusterNodePoolDevices ¶
GetConfiguredClusterNodePoolDevices read the diskpool configmap and return the contents as a map of pool device lists keyed on the node name.
func GetConfiguredNodePoolDevices ¶
GetConfiguredNodePoolDevices given a nodename, return the array of diskpool devices configured for that node returns error if no pools are configured for the node
func GetCoreAgentNodeName ¶
func GetDeployment ¶
func GetDeployment(deploymentName string, namespace string) (*appsv1.Deployment, error)
Get deployment object for "deploymentName" deployment
func GetDeploymentPods ¶
Get pods for "deploymentName" deployment in "namespace"
func GetDeploymentReplicaCount ¶
GetDeploymentReplicaCount return deployment replica count
func GetDevLinkName ¶
func GetIOEngineNodeLocsMap ¶
func GetIOEngineNodeLocsMap() (map[string]IOEngineNodeLocation, error)
func GetKubernetesSecret ¶
func GetLease ¶
func GetLease(name, ns string) (*coordinationV1.Lease, error)
GetLease return requested lease
func GetMSN ¶
func GetMSN(nodeName string) (*common.MayastorNode, error)
GetMSN Get pointer to a mayastor volume custom resource returns nil and no error if the msn is in pending state.
func GetMSV ¶
func GetMSV(uuid string) (*common.MayastorVolume, error)
GetMSV Get pointer to a mayastor volume custom resource returns nil and no error if the msv is in pending state.
func GetMayastorInitialPodCount ¶
func GetMayastorInitialPodCount() int
func GetMayastorNodeIPAddresses ¶
func GetMayastorNodeIPAddresses() []string
GetMayastorNodeIPAddresses return an array of IP addresses for nodes running mayastor. On error an empty array is returned.
func GetMayastorNodeNames ¶
func GetMayastorPodNameonNodeByPrefix ¶
GetMayastorPodNameonNodeByPrefix
func GetMsNodeStatus ¶
func GetMsvDeviceUri ¶
func GetMsvMaxSnapshotCount ¶
func GetMsvNexusChildren ¶
func GetMsvNexusChildren(volName string) ([]common.TargetChild, error)
func GetMsvNexusState ¶
func GetMsvNodes ¶
GetMsvNodes Retrieve the nexus node hosting the Mayastor Volume, and the names of the replica nodes function asserts if the volume CR is not found.
func GetMsvReplicaTopology ¶
func GetMsvReplicaTopology(volUuid string) (common.ReplicaTopology, error)
func GetMsvReplicas ¶
func GetMsvReplicas(volName string) ([]common.MsvReplica, error)
func GetMsvSize ¶
func GetMsvState ¶
func GetMsvTargetNode ¶
func GetNamespace ¶
func GetNexusNode ¶
GetNexusNode return nexus node given the volume uuid
func GetNexusNodeIp ¶
GetNexusNodeIp return nexus node IP given the volume uuid
func GetNexusUuid ¶
GetNexusUuid return the nexus uuid given the volume uuid
func GetNodeExtIPAddress ¶
GetNodeIPAddress returns IP address of a node
func GetNodeForPodByPrefix ¶
GetNodeForPodByPrefix return node where pod is running by pod prefix
func GetNodeIPAddress ¶
GetNodeIPAddress returns IP address of a node
func GetNodeListForPods ¶
func GetNodeName ¶
GetNodeName returns node name corresponding to IP address of a node
func GetNodeNqn ¶
GetNodeNqn return mayastor node nqn
func GetPV ¶
func GetPV(volName string) (*coreV1.PersistentVolume, error)
GetPV Retrieve a PV in default namespace, no options and no context
func GetPVC ¶
func GetPVC(volName string, nameSpace string) (*coreV1.PersistentVolumeClaim, error)
GetPVC Retrieve a PVC in default namespace, no options and no context
func GetPodHostIp ¶
GetPodHostIp retrieve the IP address of the node hosting a pod
func GetPodScheduledStatus ¶
func GetPodStatusByPrefix ¶
GetPodStatusByPrefix return pod phase by pod prefix
func GetPoolSizeFraction ¶
func GetPoolSizeFraction(pool common.MayastorPool, percentCapacity float64, unit string) int
returns the percentage of the disk pool in the selected units (1.00 = 100%)
func GetPoolUsageInCluster ¶
GetPoolUsageInCluster use mayastorclient to enumerate the set of pools and sum up the pool usage in the cluster
func GetPvCapacity ¶
GetPvCapacity Retrieve status capacity of a Persistent Volume
func GetPvStatusPhase ¶
func GetPvStatusPhase(volname string) (phase coreV1.PersistentVolumePhase, err error)
GetPvStatusPhase Retrieve status phase of a Persistent Volume
func GetPvcCapacity ¶
GetPvcCapacity Retrieve status capacity of a Persistent Volume Claim
func GetPvcStatusPhase ¶
func GetPvcStatusPhase(volname string, nameSpace string) (phase coreV1.PersistentVolumeClaimPhase, err error)
GetPvcStatusPhase Retrieve status phase of a Persistent Volume Claim
func GetReplicaTopoloy ¶
func GetSizePerUnits ¶
func GetSnapshot ¶
func GetSnapshot(snapshotName string, namespace string) (*snapshotv1.VolumeSnapshot, error)
Get the Volume Snapshot
func GetSnapshotBoundContentName ¶
Get the volume Snapshot bound content name
func GetSnapshotClass ¶
func GetSnapshotClass(snapshotClassName string) (*snapshotv1.VolumeSnapshotClass, error)
Get the Volume Snapshot class
func GetSnapshotContent ¶
func GetSnapshotContent(snapshotContentName string) (*snapshotv1.VolumeSnapshotContent, error)
Get the Volume Snapshot content
func GetSnapshotContentAnnotation ¶
Get the Volume Snapshot content annotation
func GetSnapshotContentReadyStatus ¶
func GetSnapshotContentReadyStatus(snapshotContentName string) (bool, *snapshotv1.VolumeSnapshotError, error)
Get the volume Snapshot content ready status
func GetSnapshotCpCloneReadyStatus ¶
Get the volume Snapshot ready status from control plane
func GetSnapshotCpReplicaSnapshots ¶
func GetSnapshotCpReplicaSnapshots(snapshotUid string, volUuid string) ([]common.ReplicaSnapshot, error)
Get the volume Snapshot replica snapshots from control plane
func GetSnapshotCpRestoreSize ¶
Get the volume Snapshot restore size from control plane
func GetSnapshotCpTimestamp ¶
Get the volume Snapshot timestamp from control plane
func GetSnapshotCreationTime ¶
Get the volumeSnapshot Creation Time
func GetSnapshotCreationTimeStamp ¶
Get the Kubernetes Snapshot "CreationTimestamp"
func GetSnapshotReadyStatus ¶
func GetSnapshotReadyStatus(snapshotName string, namespace string) (bool, *snapshotv1.VolumeSnapshotError, error)
Get the volume Snapshot ready status
func GetSnapshotRestoreSize ¶
Get the volume Snapshot restore size
func GetSnapshotUid ¶
Get the volume Snapshot Uid
func GetStsSpecReplicas ¶
func GetStsStatusReplicas ¶
func GetSystemNamespaceUuid ¶
func GetVolumeProtocol ¶
func GetVolumeSnapshotFsCheck ¶
func GetVolumeSnapshotFsCheck(volUuid string, snapshotName string, ns string, fsType common.FileSystemType) ([]string, error)
func getSnapshotCheckSum(replica replicaInfo) (string, error) { var checksum string nqn, err := GetNodeNqn(replica.IP) if err == nil { snapNqn, err := getSnapshotNqn(replica.URI) if err != nil { checksum = fmt.Sprintf("%s; %v", replica, err) } else { checksum, err = ChecksumReplica(replica.IP, replica.IP, snapNqn, 10, nqn) if err != nil { logf.Log.Info("ChecksumSnapshot failed", "error", err) // do not return from here because we want to unshare if the original // replica URI was a bdev checksum = fmt.Sprintf("%s; %v", replica, err) } } } else { logf.Log.Info("GetNodeNqn failed", "IP", replica.IP, "error", err) checksum = fmt.Sprintf("%s; %v", replica, err) } // for now ignore unshare errors as we may have successfully retrieved a checksum unsErr := mayastorclient.UnshareBdev(replica.IP, replica.UUID) if unsErr != nil { logf.Log.Info("Unshare bdev failed", "bdev UUID", replica.UUID, "node IP", replica.IP, "error", unsErr) } return checksum, err }
func HelmGetValues ¶
Get values for a release from helm command This step will be needed before performing helm upgrade step
func HelmUpgradeChartfromYaml ¶
func HelmUpgradeChartfromYaml(helmChart string, namespace string, releaseName string, setValues map[string]interface{}, filePath string, version string) (string, error)
Upgrade a chart from a yaml file using helm command
As an example "helm upgrade openebs openebs/openebs -n openebs -f old-values.yaml --version 4.1.1 \ --set openebs-crds.csi.volumeSnapshots.enabled=false"
func InstallHelmChart ¶
func IsMsvDeleted ¶
func IsMsvPublished ¶
func IsNormalPvcEventPresent ¶
func IsPVCDeleted ¶
IsPVCDeleted Check for a deleted Persistent Volume Claim, either the object does not exist or the status phase is invalid.
func IsPVDeleted ¶
IsPVDeleted Check for a deleted Persistent Volume, either the object does not exist or the status phase is invalid.
func IsPodRunning ¶
func IsPodWithLabelsRunning ¶
IsPodWithLabelsRunning expects that at any time only one application pod will be in running state if there are more then one pod in terminating state then it will return the last terminating pod.
func IsPvcBound ¶
IsPvcBound returns true if a PVC with the given name is bound otherwise false is returned.
func IsSnapshotContentDeleted ¶
IsSnapshotContentDeleted return true if Volume snapshot content does not exist in cluster
func IsSnapshotDeleted ¶
IsSnapshotDeleted return true if Volume snapshot does not exist in cluster
func IsVolumeAccessibleOverRdma ¶
IsVolumeAccessibleOverRdma return true if volume device uri scheme contains rdma if volume is accessible over rdma then device uri will be like nvmf+tcp+rdma://<some-random-string>
func IsVolumeAccessibleOverTcp ¶
IsVolumeAccessibleOverTcp return true if volume device uri scheme contains tcp and not rdma if volume is accessible over rdma then device uri will be like nvmf+tcp://<some-random-string>
func KubeCtlApplyYaml ¶
Helper for passing yaml from the specified directory to kubectl
func KubeCtlDeleteYaml ¶
Helper for passing yaml from the specified directory to kubectl
func LabelNode ¶
LabelNode add a label to a node label is a string in the form "key=value" function still succeeds if label already present
func ListAllNonMsnNodes ¶
ListAllNonMsnNodes list all nodes without io-engine label and without master node
func ListDaemonSet ¶
func ListDaemonSet(namespace string) (v1.DaemonSetList, error)
func ListIOEngineNodes ¶
func ListIOEnginePods ¶
func ListMsPools ¶
func ListMsPools() ([]common.MayastorPool, error)
func ListMsns ¶
func ListMsns() ([]common.MayastorNode, error)
func ListMsvs ¶
func ListMsvs() ([]common.MayastorVolume, error)
func ListNexusesInCluster ¶
func ListNexusesInCluster() ([]mayastorclient.MayastorNexus, error)
ListNexusesInCluster use mayastorclient to enumerate the set of mayastor nexuses present in the cluster
func ListNodesWithoutNoScheduleTaint ¶
ListNodesWithoutNoScheduleTaint returns list of nodes which does not have NoSchedule taint
func ListNvmeControllersInCluster ¶
func ListNvmeControllersInCluster() ([]mayastorclient.NvmeController, error)
ListNvmeControllersInCluster use mayastorclient to enumerate the set of mayastor nvme controllers present in the cluster
func ListPVCs ¶
func ListPVCs(nameSpace string) (*coreV1.PersistentVolumeClaimList, error)
ListPVCs retrieves pvc list from a given namespace.
func ListPodsByPrefix ¶
ListPodsByPrefix return list of pods in the given namespace with names that start with a prefix for example pods deployed on behalf of a daemonset
func ListPodsWithLabel ¶
ListPodsWithLabel return list of pods with a given label in the given namespace
func ListPoolsInCluster ¶
func ListPoolsInCluster() ([]mayastorclient.MayastorPool, error)
ListPoolsInCluster use mayastorclient to enumerate the set of mayastor pools present in the cluster
func ListReplicasInCluster ¶
func ListReplicasInCluster() ([]mayastorclient.MayastorReplica, error)
ListReplicasInCluster use mayastorclient to enumerate the set of mayastor replicas present in the cluster
func ListRunningMayastorPods ¶
List mayastor pod names, conditionally
- No timestamp - all mayastor pods
- With timestamp - all mayastor pods created after the timestamp which are Running.
func ListRunningMayastorPodsOnNode ¶
List mayastor pod names scheduled on a given node
func ListSnapshot ¶
func ListSnapshot(namespace string) (*snapshotv1.VolumeSnapshotList, error)
List the Volume Snapshot
func ListSnapshotClass ¶
func ListSnapshotClass() (*snapshotv1.VolumeSnapshotClassList, error)
List the Volume Snapshot class
func ListSnapshotContent ¶
func ListSnapshotContent() (*snapshotv1.VolumeSnapshotContentList, error)
List the Volume Snapshot content
func MakeFioContainer ¶
MakeFioContainer returns a container object setup to use e2e-fio and run fio with appropriate permissions. Privileged: True, AllowPrivilegeEscalation: True, RunAsUser root, parameters:
name - name of the container (usually the pod name) args - container arguments, if empty the defaults to "sleep", "1000000"
func MakePVC ¶
func MakePVC(volSizeMb int, volName string, scName string, volType common.VolumeType, nameSpace string, local bool, skipVolumeVerification bool) (string, error)
MakePVC Create a PVC and verify that
- The PVC status transitions to bound,
- The associated PV is created and its status transitions bound
- The associated maaystor volume is created and has a State "healthy" if engine is mayastor
func MakeSnapshot ¶
func MakeSnapshot(pvcName string, snapshotClassName string, nameSpace string, snapshotName string) (*snapshotv1.VolumeSnapshot, string, error)
MakeSnapshot Create volume snapshot and verify that
- The Snapshot created
- The Snapshot class exist
- Volume snapshot content provisioned
- Bound Volume Snapshot content ready
- Volume Snapshot ready
MakeSnapshot function return snapshot object, corresponding snapshot content name and error
func MayastorNodesReady ¶
MayastorNodesReady Checks if the requisite number of mayastor nodes are online.
func MayastorReady ¶
MayastorReady checks if the product installation is ready
func MayastorUndeletedPodCount ¶
func MayastorUndeletedPodCount() int
>=0 definitive number of mayastor pods
< 0 indeterminate
func MkNamespace ¶
func MkRestorePVC ¶
func MkRestorePVC(pvcSizeMb int, pvcName string, scName string, nameSpace string, volType common.VolumeType, snapshotName string, skipVerification bool) (string, error)
MkRestorePVC Create a PVC from snapshot source and verify that
- The PVC status transitions to bound,
- The associated PV is created and its status transitions bound
- The associated MV is created and has a State "healthy"
func MkStorageClass ¶
func MkStorageClass(scName string, scReplicas int, protocol common.ShareProto, nameSpace string) error
create a storage class with default volume binding mode i.e. not specified
func MonitorE2EFioPod ¶
func MonitorE2EFioPod(podName string, nameSpace string) (*common.E2eFioPodOutputMonitor, error)
MonitorE2EFioPod launches a go thread to stream fio pod log output and scan that stream to populate fields in E2eFioPodOutputMonitor
func MsvConsistencyCheck ¶
MsvConsistencyCheck check consistency of MSV Spec, Status, and associated objects returned by gRPC
func NewContainer ¶
func NewContainer(opts ...OptionFunc) corev1.Container
New returns a new kubernetes container
func OpenEBSReady ¶
OpenEBSReady checks if the product installation is ready
func PVCCreateAndFailCordon ¶
func PVCCreateAndFailCordon( volSizeMb int, volName string, scName string, volType common.VolumeType, nameSpace string, timeoutsecs int, ) error
Attempt to create a PV, but expect it to fail
func PodPresentOnNode ¶
PodPresentOnNode returns true if the pod is present on the given node
func PodReadyCheck ¶
list all pods in given namespace and return true if all are in running state else return false
func ReadyCheck ¶
func RefreshPvcToGetPvName ¶
Refresh the PVC contents, so that we can get the PV name.
func RemoveAllNodeSelectorsFromDaemonset ¶
RemoveAllNodeSelectorsFromDaemonset removes all node selectors from the daemonset spec and apply
func RemoveAllNodeSelectorsFromDeployment ¶
Remove all node selectors from the deployment spec and apply
func RemoveConfiguredLoopDeviceOnNode ¶
func RemoveConfiguredLoopDeviceOnNode(node string, device e2e_agent.LoopDevice) error
func RemoveConfiguredLoopDeviceOnNodes ¶
func RemoveConfiguredLoopDeviceOnNodes(nodeDeviceMap map[string]e2e_agent.LoopDevice) error
func RemoveHelmRepository ¶
func RemovePVC ¶
RmLocalPVC Delete a PVC in the default namespace and verify that
- The PVC is deleted
- The associated PV is deleted
- The associated mayastor volume is deleted if engine is mayastor
func RemovePVFinalizer ¶
RemovePVFinalizer remove the finalizer of a given PV
func RemoveRdmaDeviceOnAllWorkerNodes ¶
func RemoveRdmaDeviceOnAllWorkerNodes() error
func RemoveRdmaDeviceOnNode ¶
func RemoveSnapshot ¶
RemoveSnapshot delete a snapshot in namespace and verify that
- The Volume Snapshot is deleted
- The associated Volume Snapshot ContentPV is deleted
func RemoveSnapshotContentAnnotation ¶
Remove the Volume Snapshot content annotations
func ReplaceConfigMapData ¶
func ResourceCheck ¶
ResourceCheck Fit for purpose checks - No pods - No PVCs - No PVs - No MSVs - Mayastor pods are all healthy - All mayastor pools are online and if e2e-agent is available - mayastor pools usage is 0 - No nexuses - No replicas
func ResourceK8sCheck ¶
func ResourceK8sCheck() error
func RestartMayastor ¶
RestartMayastor this function "restarts" mayastor by
- cleaning up all mayastor resource artefacts,
- deleting all mayastor pods
func RestartMayastorPods ¶
RestartMayastorPods shortcut to reinstalling mayastor, especially useful on some platforms, for example calling this function after patching the installation to use different mayastor images, should allow us to have reasonable confidence that mayastor has been restarted with those images. Deletes all mayastor pods except for mayastor etcd pods, then waits upto specified time for new pods to be provisioned Simply deleting the pods and then waiting for daemonset ready checks do not work due to k8s latencies, for example it has been observed the mayastor-csi pods are deemed ready because they enter terminating state after we've checked for readiness Caller must perform readiness checks after calling this function.
func RestartMayastorPodsOnNode ¶
func RestartMayastorPodsOnNode(restartTOSecs int, readyTOSecs int, poolsTOSecs int, nodeName string) error
RestartMayastorPodsOnNode restart all mayastor pods scheduled on a given node
func RestartPodByPrefix ¶
RestartPodByPrefix restart the pod by prefix name
func RestoreConfiguredPools ¶
func RestoreConfiguredPools() error
func RmNamespace ¶
func RmReplicasInCluster ¶
func RmReplicasInCluster() error
RmReplicasInCluster use mayastorclient to remove mayastor replicas present in the cluster
func RunFio ¶
func RunFio(podName string, duration int, filename string, sizeMb int, args ...string) ([]byte, error)
FIXME: this function runs fio with a bunch of parameters which are not configurable. sizeMb should be 0 for fio to use the entire block device
func SaveHelmValues ¶
Save values for a release from helm command to a yaml file As an example "helm get values openebs -n openebs -o yaml > old-values.yaml"
func ScaleCsiDeployment ¶
ScaleCsiDeployment scale up or scale down CSI deployment
func ScanFioPodLogs ¶
func ScanFioPodLogs(pod v1.Pod, synopsisIn *common.E2eFioPodLogSynopsis) *common.E2eFioPodLogSynopsis
func ScanFioPodLogsByName ¶
func ScanFioPodLogsByName(podName string, nameSpace string) (*common.E2eFioPodLogSynopsis, error)
func SetAllContainerArgs ¶
func SetAllContainerArgs(deploymentName string, containerName string, namespace string, args []string) error
Set all of the arguments for a container. Used for restoring the original set.
func SetContainerArgs ¶
func SetContainerArgs(deploymentName string, containerName string, namespace string, argKey string, argValue string) ([]string, error)
Add argument to container in deployment
func SetDeploymentReplication ¶
Adjust the number of replicas in the deployment
func SetMayastorInitialPodCount ¶
func SetMayastorInitialPodCount(count int)
func SetMsvReplicaCount ¶
func SetNexusRebuildVerify ¶
SetNexusRebuildVerify sets or removes environment variable NEXUS_REBUILD_VERIFY for IO engine daemonset, then deletes all the IO engine pods and waits for Mayastor to be ready and pools to be online
func SetPromtailTolerations ¶
func SetPromtailTolerations(tolerations []coreV1.Toleration, promtailDsName string, namespace string) error
func SetStatefulsetReplication ¶
Adjust the number of replicas in the statefulset
func SetupControlNode ¶
SetupControlNode set up a node as the control node, A node is selected if it does not have any labels in the set defined by excludeLabels. A control node which is not a k8s master/control-plane node will be tainted with NoSchedule. Workloads are scheduled on the control node by setting tolerations when deploying the workload.
func SetupK8sEnv ¶
func SetupK8sEnv() error
func SetupK8sEnvBasic ¶
func SetupK8sEnvBasic() error
func SetupK8sLib ¶
func SetupK8sLib() error
SetupK8sLib convenience function for applications using common code go code using ginkgo should not invoke this function.
func SetupPostgresEnvironment ¶
SetupPostgresEnvironment sets up the environment for PostgreSQL by managing node labels and taints. Normally called in Before suit action. It will return a slice of nodes which are ready for postgres installation.
func StatefulSetReady ¶
func SuppressMayastorPodOnNode ¶
SuppressMayastorPodOnNode Prevent mayastor pod from running on the given node.
func TeardownTestEnv ¶
func TeardownTestEnv() error
func TeardownTestEnvNoCleanup ¶
func TeardownTestEnvNoCleanup() error
func TryMkOversizedPVC ¶
func UnShareReplica ¶
func UninstallE2eAgent ¶
func UninstallE2eAgent() error
func UninstallHelmRelease ¶
func UnlabelNode ¶
UnlabelNode remove a label from a node function still succeeds if label not present
func UnscheduleIoEngineFromNode ¶
func UnscheduleIoEngineFromNode(nodeIP string, nodeName string, podPrefix string, timeoutSecs int) error
UnscheduleIoEngineFromNode remove io engine label and verify pod removal from node
func UnsuppressMayastorPodOnNode ¶
UnsuppressMayastorPodOnNode Allow mayastor pod to run on the given node.
func UpdateDaemonSet ¶
func UpdateDemonsetContainerAllEnv ¶
func UpdateDemonsetContainerAllEnv(daemonsetName string, containerName string, namespace string, env []coreV1.EnvVar) error
update daemonset container all env
func UpdateDemonsetContainerEnv ¶
func UpdateDemonsetContainerEnv(daemonsetName string, containerName string, namespace string, envName string, envValue string) ([]coreV1.EnvVar, error)
update daemonset container env
func UpdateDeploymentReplica ¶
func UpdateHelmRepository ¶
func UpdateNodeTaints ¶
func UpdatePVC ¶
func UpdatePVC(pvc *coreV1.PersistentVolumeClaim, nameSpace string) (*coreV1.PersistentVolumeClaim, error)
UpdatePVC update a PVC in given namespace, no options and no context
func UpdatePvcSize ¶
func UpdatePvcSize(pvcName string, namespace string, volSizeMb int) (*coreV1.PersistentVolumeClaim, error)
UpdatePvcSize updates the pvc resource request size
func UpgradeHelmChart ¶
func VerifyIoEnginePodCreationOnNode ¶
VerifyIoEnginePodCreationOnNode verify io engine pod creation on node
func VerifyIoEnginePodDeletionFromNode ¶
VerifyIoEnginePodDeletionFromNode verify io engine pod removal from node
func VerifyMayastorPvcIsUsable ¶
func VerifyMayastorPvcIsUsable(pvc *coreV1.PersistentVolumeClaim) error
func VerifyMayastorVolumeProvision ¶
Verify volume provisioning, return mayastor volume uuid and error
func VerifyPodStatusWithAppLabel ¶
VerifyPodStatusWithAppLabel return true if all the pod with a given label are in running state
func VerifyPodsOnNode ¶
func VerifyPvcCreateAndFail ¶
func VerifyVolumeProvision ¶
VerifyVolumeProvision Verify volume provisioning, return volume uuid and error
func VolumeComparePreFlightChecks ¶
func VolumeComparePreFlightChecks(volUuid string, volTyp common.VolumeType, volName string, waitSecs uint) error
VolumeComparePreFlightChecks volume replicas can only be compared meaningfully if the volume is not degraded - ie all replicas are online and rebuilds if any have been completed. rebuilds will not complete if the volume is unpublished so this function mounts the volume on a sleeper fio pio (no io) and waits for the volume to be healthy, within a time period.
func WaitFioPodComplete ¶
WaitFioPodComplete waits until pod is in completed state
func WaitForDeploymentReady ¶
func WaitForMCPPath ¶
func WaitForMayastorSockets ¶
func WaitForMayastorVolumeToProvision ¶
func WaitForMayastorVolumeToProvision(msvName string) (*common.MayastorVolume, error)
Wait for the mayastor volume to be provisioned
func WaitForPodAbsentFromNode ¶
func WaitForPodAbsentFromNode(podNameRegexp string, namespace string, nodeName string, timeoutSeconds int) error
Wait until all instances of the specified pod are absent from the given node
func WaitForPodNotRunningOnNode ¶
func WaitForPodNotRunningOnNode(podNameRegexp string, namespace string, nodeName string, timeoutSeconds int) error
Wait until the instance of the specified pod is absent or not in the running state on the given node
func WaitForPodRunning ¶
Wait until the instance of the specified pod with prefix is present and in the running state
func WaitForPodRunningOnNode ¶
func WaitForPodRunningOnNode(podNameRegexp string, namespace string, nodeName string, timeoutSeconds int) error
Wait until the instance of the specified pod is present and in the running state on the given node
func WaitForPoolsToBeOnline ¶
func WaitForPvToProvision ¶
Wait for the PV to be provisioned
func WaitForPvcNormalEvent ¶
Wait for the PVC normal event return true if pvc normal event found else return false , it return error in case of error
func WaitPodComplete ¶
WaitPodComplete waits until pod is in completed state
func WaitPodRunning ¶
WaitPodRunning wait for pod to transition to running with timeout, returns true of the pod is running, false otherwise.
func WaitPvcToBound ¶
Wait for the PVC to bound
func WipeVolumeReplicas ¶
func ZapPoolDevices ¶
func ZapPoolDevices() error
func ZeroDeploymentReplicas ¶
func ZeroNodeHugePages ¶
ZeroNodeHugePages sets huge pages to 0 on current node
Types ¶
type BenchmarkParams ¶
type Chart ¶
type Chart struct { Name string `json:"name"` Version string `json:"version"` AppVersion string `json:"app_version"` Description string `json:"description"` }
type ContainerBuilder ¶
type ContainerBuilder struct {
// contains filtered or unexported fields
}
Builder provides utilities required to build a kubernetes container type
func NewContainerBuilder ¶
func NewContainerBuilder() *ContainerBuilder
NewBuilder returns a new instance of builder
func (*ContainerBuilder) Build ¶
func (b *ContainerBuilder) Build() (corev1.Container, error)
Build returns the final kubernetes container
func (*ContainerBuilder) WithArgumentsNew ¶
func (b *ContainerBuilder) WithArgumentsNew(args []string) *ContainerBuilder
WithArgumentsNew sets the command arguments of the container
func (*ContainerBuilder) WithCommandNew ¶
func (b *ContainerBuilder) WithCommandNew(cmd []string) *ContainerBuilder
WithCommandNew sets the command of the container
func (*ContainerBuilder) WithEnvs ¶
func (b *ContainerBuilder) WithEnvs(envs []corev1.EnvVar) *ContainerBuilder
WithEnvs sets the envs of the container
func (*ContainerBuilder) WithEnvsNew ¶
func (b *ContainerBuilder) WithEnvsNew(envs []corev1.EnvVar) *ContainerBuilder
WithEnvsNew sets the envs of the container
func (*ContainerBuilder) WithImage ¶
func (b *ContainerBuilder) WithImage(img string) *ContainerBuilder
WithImage sets the image of the container
func (*ContainerBuilder) WithImagePullPolicy ¶
func (b *ContainerBuilder) WithImagePullPolicy(policy corev1.PullPolicy) *ContainerBuilder
WithImagePullPolicy sets the image pull policy of the container
func (*ContainerBuilder) WithLifeCycle ¶
func (b *ContainerBuilder) WithLifeCycle(lc *corev1.Lifecycle) *ContainerBuilder
WithLifeCycle sets the life cycle of the container
func (*ContainerBuilder) WithLivenessProbe ¶
func (b *ContainerBuilder) WithLivenessProbe(liveness *corev1.Probe) *ContainerBuilder
WithLivenessProbe sets the liveness probe of the container
func (*ContainerBuilder) WithName ¶
func (b *ContainerBuilder) WithName(name string) *ContainerBuilder
WithName sets the name of the container
func (*ContainerBuilder) WithPortsNew ¶
func (b *ContainerBuilder) WithPortsNew(ports []corev1.ContainerPort) *ContainerBuilder
WithPortsNew sets ports of the container
func (*ContainerBuilder) WithPrivilegedSecurityContext ¶
func (b *ContainerBuilder) WithPrivilegedSecurityContext(privileged *bool) *ContainerBuilder
WithPrivilegedSecurityContext sets securitycontext of the container
func (*ContainerBuilder) WithResources ¶
func (b *ContainerBuilder) WithResources( resources *corev1.ResourceRequirements, ) *ContainerBuilder
WithResources sets resources of the container
func (*ContainerBuilder) WithResourcesByValue ¶
func (b *ContainerBuilder) WithResourcesByValue(resources corev1.ResourceRequirements) *ContainerBuilder
WithResourcesByValue sets resources of the container
func (*ContainerBuilder) WithVolumeDevice ¶
func (b *ContainerBuilder) WithVolumeDevice(volumeDevice corev1.VolumeDevice) *ContainerBuilder
func (*ContainerBuilder) WithVolumeDeviceOrMount ¶
func (b *ContainerBuilder) WithVolumeDeviceOrMount(volName string, volType common.VolumeType) *ContainerBuilder
func (*ContainerBuilder) WithVolumeDevices ¶
func (b *ContainerBuilder) WithVolumeDevices(volumeDevices []corev1.VolumeDevice) *ContainerBuilder
WithVolumeDevices builds the containers with the appropriate volumeDevices
func (*ContainerBuilder) WithVolumeMount ¶
func (b *ContainerBuilder) WithVolumeMount(volumeMount corev1.VolumeMount) *ContainerBuilder
func (*ContainerBuilder) WithVolumeMountsNew ¶
func (b *ContainerBuilder) WithVolumeMountsNew(volumeMounts []corev1.VolumeMount) *ContainerBuilder
WithVolumeMountsNew sets the command arguments of the container
type Deployment ¶
type Deployment struct {
// contains filtered or unexported fields
}
Deployment is the wrapper over k8s deployment Object
func NewForAPIObject ¶
func NewForAPIObject( obj *appsv1.Deployment, opts ...deploymentBuildOption, ) *Deployment
NewForAPIObject returns a new instance of builder for a given deployment Object
func (*Deployment) IsNotSyncSpec ¶
func (d *Deployment) IsNotSyncSpec() bool
IsNotSyncSpec compare generation in status and spec and check if deployment spec is synced or not. If Generation <= Status.ObservedGeneration then deployment spec is not updated yet.
func (*Deployment) IsTerminationInProgress ¶
func (d *Deployment) IsTerminationInProgress() bool
IsTerminationInProgress checks for older replicas are waiting to terminate or not. If Status.Replicas > Status.UpdatedReplicas then some of the older replicas are in running state because newer replicas are not in running state. It waits for newer replica to come into running state then terminate.
func (*Deployment) IsUpdateInProgress ¶
func (d *Deployment) IsUpdateInProgress() bool
IsUpdateInProgress Checks if all the replicas are updated or not. If Status.AvailableReplicas < Status.UpdatedReplicas then all the older replicas are not there but there are less number of availableReplicas
func (*Deployment) VerifyReplicaStatus ¶
func (d *Deployment) VerifyReplicaStatus() error
VerifyReplicaStatus verifies whether all the replicas of the deployment are up and running
type DeploymentBuilder ¶
type DeploymentBuilder struct {
// contains filtered or unexported fields
}
Builder enables building an instance of deployment
func NewDeploymentBuilder ¶
func NewDeploymentBuilder() *DeploymentBuilder
NewBuilder returns a new instance of builder meant for deployment
func (*DeploymentBuilder) Build ¶
func (b *DeploymentBuilder) Build() (*appsv1.Deployment, error)
Build returns a deployment instance
func (*DeploymentBuilder) WithLabelsNew ¶
func (b *DeploymentBuilder) WithLabelsNew(labels map[string]string) *DeploymentBuilder
WithLabelsNew resets existing labels if any with ones that are provided here
func (*DeploymentBuilder) WithName ¶
func (b *DeploymentBuilder) WithName(name string) *DeploymentBuilder
WithName sets the Name field of deployment with provided value.
func (*DeploymentBuilder) WithNamespace ¶
func (b *DeploymentBuilder) WithNamespace(namespace string) *DeploymentBuilder
WithNamespace sets the Namespace field of deployment with provided value.
func (*DeploymentBuilder) WithNodeSelector ¶
func (b *DeploymentBuilder) WithNodeSelector(selector map[string]string) *DeploymentBuilder
WithNodeSelector Sets the node selector with the provided argument.
func (*DeploymentBuilder) WithNodeSelectorNew ¶
func (b *DeploymentBuilder) WithNodeSelectorNew(selector map[string]string) *DeploymentBuilder
WithNodeSelector Sets the node selector with the provided argument.
func (*DeploymentBuilder) WithPodTemplateSpecBuilder ¶
func (b *DeploymentBuilder) WithPodTemplateSpecBuilder( tmplbuilder *PodtemplatespecBuilder, ) *DeploymentBuilder
WithPodTemplateSpecBuilder sets the template field of the deployment
func (*DeploymentBuilder) WithReplicas ¶
func (b *DeploymentBuilder) WithReplicas(replicas *int32) *DeploymentBuilder
WithReplicas sets the replica field of deployment
func (*DeploymentBuilder) WithSelectorMatchLabels ¶
func (b *DeploymentBuilder) WithSelectorMatchLabels(matchlabels map[string]string) *DeploymentBuilder
WithSelectorMatchLabels merges existing matchlabels if any with the ones that are provided here
func (*DeploymentBuilder) WithSelectorMatchLabelsNew ¶
func (b *DeploymentBuilder) WithSelectorMatchLabelsNew(matchlabels map[string]string) *DeploymentBuilder
WithSelectorMatchLabelsNew resets existing matchlabels if any with ones that are provided here
type FioApp ¶
type FioApp struct { Decor string DeployName string VolSizeMb int VolType common.VolumeType FsType common.FileSystemType // FsPercent -> controls size of file allocated on FS // 0 -> default (lessby N blocks) unless FsMiB is non-zero // > 0 < 100 percentage of available blocks used FsPercent uint // FS test file size in MiB - only effective if FsPercent == 0 FsMiB uint ReplicaCount int Runtime uint Loops int VerifyReplicasOnDelete bool AddFioArgs []string StatusInterval int OutputFormat string AppNodeName string ZeroFill bool WipeReplicas bool ThinProvisioned bool VolWaitForFirstConsumer bool Liveness bool BlockSize uint SnapshotName string CloneFsIdAsVolumeId common.CloneFsIdAsVolumeIdType FioDebug string SaveFioPodLog bool PostOpSleep uint MountOptions []string VerifyReplicaWaitHealthyVolTimeSecs uint SkipRestoreVolumeVerification bool AllowVolumeExpansion common.AllowVolumeExpansion NodeHasTopologyKey string NodeSpreadTopologyKey string NodeAffinityTopologyLabel map[string]string MaxSnapshots int PoolHasTopologyKey string PoolAffinityTopologyLabel map[string]string MountReadOnly bool // contains filtered or unexported fields }
func (*FioApp) CreateVolume ¶
func (*FioApp) DeployAppWithArgs ¶
func (dfa *FioApp) DeployAppWithArgs(fioArgsSet common.FioAppArgsSet) error
func (*FioApp) DeployFio ¶
func (dfa *FioApp) DeployFio(fioArgsSet common.FioAppArgsSet, podPrefix string) error
func (*FioApp) DumpPodLog ¶
func (dfa *FioApp) DumpPodLog()
func (*FioApp) DumpReplicas ¶
func (dfa *FioApp) DumpReplicas()
func (*FioApp) ForcedCleanup ¶
func (dfa *FioApp) ForcedCleanup()
ForcedCleanup - delete resources associated with the FioApp by name regardless of creation status This function should be used sparingly. FIXME: refactor so that is function can be replaced by simply calling Cleanup
func (*FioApp) GetAppUuid ¶
func (*FioApp) GetPodName ¶
func (*FioApp) GetReplicaCount ¶
func (*FioApp) GetVolName ¶
func (*FioApp) GetVolUuid ¶
func (*FioApp) ImportVolume ¶
func (*FioApp) ImportVolumeFromApp ¶
func (*FioApp) IsPVCCreated ¶
PVC was created and PVC may not be accessbile
func (*FioApp) IsVolumeCreated ¶
PVC was created and PVC is accessbile
func (*FioApp) MonitorPod ¶
func (dfa *FioApp) MonitorPod() (*common.E2eFioPodOutputMonitor, error)
MonitorPod - invokes MonitorE2EFioPod which launches a go thread to stream fio pod log output and scan that stream to populate fields in E2eFioPodOutputMonitor
func (*FioApp) RefreshDeploymentFioPodName ¶
RefreshDeploymentFioPodName update the name of the pod from the k8s deployment object
func (*FioApp) RefreshVolumeState ¶
func (*FioApp) ScaleVolumeReplicas ¶
func (*FioApp) SetAppNodeName ¶
func (*FioApp) SetVolumeReplicaCount ¶
func (*FioApp) VerifyReplicas ¶
VerifyReplicas verify replicas for volumes used by the FioApp instance
func (*FioApp) WaitComplete ¶
func (*FioApp) WaitDeploymentRunning ¶
WaitDeploymentRunning wait for the number of running pod replicas to match 1
func (*FioApp) WaitFioComplete ¶
func (*FioApp) WaitRunning ¶
type FioApplication ¶
type FioApplication struct { Decor string VolSizeMb int VolType common.VolumeType FsType common.FileSystemType OpenEbsEngine common.OpenEbsEngine // FsPercent -> controls size of file allocated on FS // 0 -> default (lessby N blocks) unless FsMiB is non-zero. // > 0 < 100 percentage of available blocks used FsPercent uint // non-zero and FsPercent is 0 -> test file size in MiB FsMiB uint Runtime uint Loops int AddFioArgs []string StatusInterval int OutputFormat string AppNodeName string VolWaitForFirstConsumer bool ScMountOptions []string ScReclaimPolicy v1.PersistentVolumeReclaimPolicy Liveness bool BlockSize uint FioDebug string SaveFioPodLog bool PostOpSleep uint AllowVolumeExpansion common.AllowVolumeExpansion Lvm LvmOptions Zfs ZfsOptions HostPath HostPathOptions SkipPvcVerificationAfterCreate bool // contains filtered or unexported fields }
func (*FioApplication) Cleanup ¶
func (dfa *FioApplication) Cleanup() error
func (*FioApplication) CreateSc ¶
func (dfa *FioApplication) CreateSc() error
func (*FioApplication) CreateVolume ¶
func (dfa *FioApplication) CreateVolume() error
func (*FioApplication) DeletePod ¶
func (dfa *FioApplication) DeletePod() error
func (*FioApplication) DeployAppWithArgs ¶
func (dfa *FioApplication) DeployAppWithArgs(fioArgsSet common.FioAppArgsSet) error
func (*FioApplication) DeployApplication ¶
func (dfa *FioApplication) DeployApplication() error
func (*FioApplication) DeployFio ¶
func (dfa *FioApplication) DeployFio(fioArgsSet common.FioAppArgsSet, podPrefix string) error
func (*FioApplication) DumpPodLog ¶
func (dfa *FioApplication) DumpPodLog()
func (*FioApplication) FioTargetSizes ¶
func (dfa *FioApplication) FioTargetSizes() (map[string]uint64, error)
func (*FioApplication) ForcedCleanup ¶
func (dfa *FioApplication) ForcedCleanup()
ForcedCleanup - delete resources associated with the FioApplicationlication by name regardless of creation status This function should be used sparingly. FIXME: refactor so that is function can be replaced by simply calling Cleanup
func (*FioApplication) GetAppUuid ¶
func (dfa *FioApplication) GetAppUuid() string
func (*FioApplication) GetPodName ¶
func (dfa *FioApplication) GetPodName() string
func (*FioApplication) GetPodStatus ¶
func (dfa *FioApplication) GetPodStatus() (coreV1.PodPhase, error)
func (*FioApplication) GetPvcName ¶
func (dfa *FioApplication) GetPvcName() string
func (*FioApplication) GetScName ¶
func (dfa *FioApplication) GetScName() string
func (*FioApplication) ImportVolume ¶
func (dfa *FioApplication) ImportVolume(volName string) error
func (*FioApplication) ImportVolumeFromApp ¶
func (dfa *FioApplication) ImportVolumeFromApp(srcDfa *FioApplication) error
func (*FioApplication) IsPVCCreated ¶
func (dfa *FioApplication) IsPVCCreated() bool
PVC was created and PVC may not be accessbile
func (*FioApplication) MonitorPod ¶
func (dfa *FioApplication) MonitorPod() (*common.E2eFioPodOutputMonitor, error)
MonitorPod - invokes MonitorE2EFioPod which launches a go thread to stream fio pod log output and scan that stream to populate fields in E2eFioPodOutputMonitor
func (*FioApplication) RefreshVolumeState ¶
func (dfa *FioApplication) RefreshVolumeState() error
func (*FioApplication) SetAppNodeName ¶
func (dfa *FioApplication) SetAppNodeName(nodeName string) error
func (*FioApplication) WaitComplete ¶
func (dfa *FioApplication) WaitComplete(timeoutSecs int) error
func (*FioApplication) WaitFioComplete ¶
func (dfa *FioApplication) WaitFioComplete(timeoutSecs int, pollTimeSecs int) (int, error)
func (*FioApplication) WaitRunning ¶
func (dfa *FioApplication) WaitRunning(timeoutSecs int) bool
type FioApplicationStatus ¶
type FioApplicationStatus struct {
// contains filtered or unexported fields
}
type FioStsApp ¶
type FioStsApp struct { Decor string VolSizeMb int ScName string StsName string VolName string // StatefulSet allows you to relax its ordering guarantees while preserving // its uniqueness and identity guarantees via its .spec.podManagementPolicy field // values permitted: "Parallel" and "OrderedReady" StsPodManagementPolicy string StsAffinityGroup string // "true" or "false" for anti affinity feature for volume replicas and target VolType common.VolumeType StsReplicaCount *int32 VolReplicaCount int VolUuid string FioArgs []string Runtime uint Loops int VerifyReplicasOnDelete bool AppNodeName string }
type HostPathOptions ¶
type IOEngineNodeLocation ¶
func GetIOEngineNodes ¶
func GetIOEngineNodes() ([]IOEngineNodeLocation, error)
type LvmOptions ¶
type MongoApp ¶
type MongoApp struct { Namespace string Pod coreV1.Pod VolUuid string ReleaseName string ReplicaCount int ScName string Standalone bool PvcName string Ycsb bool }
func (*MongoApp) CompareBSONChecksums ¶
func (*MongoApp) MongoInstallReady ¶
type NodeLocation ¶
type NodeLocation struct { NodeName string IPAddress string MayastorNode bool K8sControlPlane bool ControlNode bool ExtIPAddress string }
func GetTestControlNodes ¶
func GetTestControlNodes() ([]NodeLocation, error)
func ListWorkerNode ¶
func ListWorkerNode() ([]NodeLocation, error)
type OptionFunc ¶
type OptionFunc func(*container)
OptionFunc is a typed function that abstracts anykind of operation against the provided container instance
This is the basic building block to create functional operations against the container instance
type PgBenchApp ¶
type PgBenchApp struct { BenchmarkParams PgBenchmarkParams // Parameters for benchmarking. Name string // Name of the PgBench application. Namespace string // Kubernetes namespace for the PgBench application. NodeSelector string // Node selector for scheduling the PgBench Pod. Pod *coreV1.Pod // Kubernetes Pod running the PgBench application. }
PgBenchApp represents a PgBench application configuration for benchmarking PostgreSQL.
func (*PgBenchApp) DeletePgBenchJob ¶
func (pgBench *PgBenchApp) DeletePgBenchJob(jobName string) error
func (*PgBenchApp) GetPgBenchJob ¶
func (pgBench *PgBenchApp) GetPgBenchJob(jobName string) (*batchV1.Job, error)
func (*PgBenchApp) InitializePgBench ¶
func (pgBench *PgBenchApp) InitializePgBench(host string) error
InitializePgBench initializes the PgBench database. Must be called before RunPgBench
func (*PgBenchApp) RunPgBench ¶
func (pgBench *PgBenchApp) RunPgBench(host string) error
RunPgBench runs the PgBench benchmark on the PostgreSQL database.
type PgBenchAppBuilder ¶
type PgBenchAppBuilder struct {
// contains filtered or unexported fields
}
func NewPgBenchAppBuilder ¶
func NewPgBenchAppBuilder() *PgBenchAppBuilder
NewPgBenchAppBuilder creates a new PgBenchApp instance with default benchmark parameters.
func (*PgBenchAppBuilder) Build ¶
func (b *PgBenchAppBuilder) Build() *PgBenchApp
func (*PgBenchAppBuilder) WithBenchmarkParams ¶
func (b *PgBenchAppBuilder) WithBenchmarkParams(params PgBenchmarkParams) *PgBenchAppBuilder
func (*PgBenchAppBuilder) WithName ¶
func (b *PgBenchAppBuilder) WithName(name string) *PgBenchAppBuilder
func (*PgBenchAppBuilder) WithNamespace ¶
func (b *PgBenchAppBuilder) WithNamespace(namespace string) *PgBenchAppBuilder
func (*PgBenchAppBuilder) WithNodeSelector ¶
func (b *PgBenchAppBuilder) WithNodeSelector(nodeSelector string) *PgBenchAppBuilder
type PgBenchmarkParams ¶
type PodBuilder ¶
type PodBuilder struct {
// contains filtered or unexported fields
}
PodBuilder is the builder object for Pod
func NewPodBuilder ¶
func NewPodBuilder(appLabelValue string) *PodBuilder
NewPodBuilder returns new instance of Builder
func (*PodBuilder) Build ¶
func (b *PodBuilder) Build() (*corev1.Pod, error)
Build returns the Pod API instance
func (*PodBuilder) WithContainer ¶
func (b *PodBuilder) WithContainer(container corev1.Container) *PodBuilder
WithContainer sets the Containers field in Pod with provided arguments
func (*PodBuilder) WithContainers ¶
func (b *PodBuilder) WithContainers(containers []corev1.Container) *PodBuilder
WithContainers sets the Containers field in Pod with provided arguments
func (*PodBuilder) WithHostPath ¶
func (b *PodBuilder) WithHostPath(name string, hostPath string) *PodBuilder
func (*PodBuilder) WithLabels ¶
func (b *PodBuilder) WithLabels(labels map[string]string) *PodBuilder
WithNamespace sets the Namespace field of Pod with provided value.
func (*PodBuilder) WithMountReadOnly ¶
func (b *PodBuilder) WithMountReadOnly(rdOnly bool) *PodBuilder
WithMountReadOnly - mount filesystem volumes as read only fails at Build if volume is raw block
func (*PodBuilder) WithName ¶
func (b *PodBuilder) WithName(name string) *PodBuilder
WithName sets the Name field of Pod with provided value.
func (*PodBuilder) WithNamespace ¶
func (b *PodBuilder) WithNamespace(namespace string) *PodBuilder
WithNamespace sets the Namespace field of Pod with provided value.
func (*PodBuilder) WithNodeName ¶
func (b *PodBuilder) WithNodeName(nodeName string) *PodBuilder
WithNodeName sets the NodeName field of Pod with provided value.
func (*PodBuilder) WithNodeSelectorHostnameNew ¶
func (b *PodBuilder) WithNodeSelectorHostnameNew(hostname string) *PodBuilder
WithNodeSelectorHostnameNew sets the Pod NodeSelector to the provided hostname value This function replaces (resets) the NodeSelector to use only hostname selector
func (*PodBuilder) WithRestartPolicy ¶
func (b *PodBuilder) WithRestartPolicy( restartPolicy corev1.RestartPolicy, ) *PodBuilder
WithRestartPolicy sets the RestartPolicy field in Pod with provided arguments
func (*PodBuilder) WithServiceAccountName ¶
func (b *PodBuilder) WithServiceAccountName(serviceAccountName string) *PodBuilder
WithServiceAccountName sets the ServiceAccountName of Pod spec with the provided value
func (*PodBuilder) WithTolerationsForTaints ¶
func (b *PodBuilder) WithTolerationsForTaints(taints ...corev1.Taint) *PodBuilder
WithTolerationsForTaints sets the Spec.Tolerations with provided taints.
func (*PodBuilder) WithVolume ¶
func (b *PodBuilder) WithVolume(volume corev1.Volume) *PodBuilder
WithVolume sets the Volumes field in Pod with provided arguments
func (*PodBuilder) WithVolumeDevice ¶
func (b *PodBuilder) WithVolumeDevice(volDevice corev1.VolumeDevice) *PodBuilder
WithVolumeDevice sets the Volumes field in Pod with provided arguments
func (*PodBuilder) WithVolumeDeviceOrMount ¶
func (b *PodBuilder) WithVolumeDeviceOrMount(volType common.VolumeType) *PodBuilder
func (*PodBuilder) WithVolumeDevices ¶
func (b *PodBuilder) WithVolumeDevices(volDevices []corev1.VolumeDevice) *PodBuilder
WithVolumeDevices sets the Volumes field in Pod with provided arguments
func (*PodBuilder) WithVolumeMount ¶
func (b *PodBuilder) WithVolumeMount(volMount corev1.VolumeMount) *PodBuilder
WithVolumeMount sets the Volumes field in Pod with provided arguments
func (*PodBuilder) WithVolumeMounts ¶
func (b *PodBuilder) WithVolumeMounts(volMounts []corev1.VolumeMount) *PodBuilder
WithVolumeMounts sets the Volumes field in Pod with provided arguments
func (*PodBuilder) WithVolumes ¶
func (b *PodBuilder) WithVolumes(volumes []corev1.Volume) *PodBuilder
WithVolumes sets the Volumes field in Pod with provided arguments
type PodTemplateSpec ¶
type PodTemplateSpec struct {
Object *corev1.PodTemplateSpec
}
PodTemplateSpec holds the api's podtemplatespec objects
type PodtemplatespecBuilder ¶
type PodtemplatespecBuilder struct {
// contains filtered or unexported fields
}
Builder is the builder object for Pod
func NewPodtemplatespecBuilder ¶
func NewPodtemplatespecBuilder() *PodtemplatespecBuilder
NewBuilder returns new instance of Builder
func (*PodtemplatespecBuilder) Build ¶
func (b *PodtemplatespecBuilder) Build() (*PodTemplateSpec, error)
Build returns a padTemplateSpec instance
func (*PodtemplatespecBuilder) WithAffinity ¶
func (b *PodtemplatespecBuilder) WithAffinity(affinity *corev1.Affinity) *PodtemplatespecBuilder
WithAffinity sets the affinity field of podtemplatespec
func (*PodtemplatespecBuilder) WithAnnotations ¶
func (b *PodtemplatespecBuilder) WithAnnotations(annotations map[string]string) *PodtemplatespecBuilder
WithAnnotations merges existing annotations if any with the ones that are provided here
func (*PodtemplatespecBuilder) WithAnnotationsNew ¶
func (b *PodtemplatespecBuilder) WithAnnotationsNew(annotations map[string]string) *PodtemplatespecBuilder
WithAnnotationsNew resets the annotation field of podtemplatespec with provided arguments
func (*PodtemplatespecBuilder) WithContainerBuilders ¶
func (b *PodtemplatespecBuilder) WithContainerBuilders( containerBuilderList ...*ContainerBuilder, ) *PodtemplatespecBuilder
WithContainerBuilders builds the list of containerbuilder provided and merges it to the containers field of the podtemplatespec
func (*PodtemplatespecBuilder) WithContainerBuildersNew ¶
func (b *PodtemplatespecBuilder) WithContainerBuildersNew( containerBuilderList ...*ContainerBuilder, ) *PodtemplatespecBuilder
WithContainerBuildersNew builds the list of containerbuilder provided and sets the containers field of the podtemplatespec
func (*PodtemplatespecBuilder) WithLabels ¶
func (b *PodtemplatespecBuilder) WithLabels(labels map[string]string) *PodtemplatespecBuilder
WithLabels merges existing labels if any with the ones that are provided here
func (*PodtemplatespecBuilder) WithLabelsNew ¶
func (b *PodtemplatespecBuilder) WithLabelsNew(labels map[string]string) *PodtemplatespecBuilder
WithLabelsNew resets the labels field of podtemplatespec with provided arguments
func (*PodtemplatespecBuilder) WithName ¶
func (b *PodtemplatespecBuilder) WithName(name string) *PodtemplatespecBuilder
WithName sets the Name field of podtemplatespec with provided value.
func (*PodtemplatespecBuilder) WithNamespace ¶
func (b *PodtemplatespecBuilder) WithNamespace(namespace string) *PodtemplatespecBuilder
WithNamespace sets the Namespace field of PodTemplateSpec with provided value.
func (*PodtemplatespecBuilder) WithNodeSelector ¶
func (b *PodtemplatespecBuilder) WithNodeSelector(nodeselectors map[string]string) *PodtemplatespecBuilder
WithNodeSelector merges the nodeselectors if present with the provided arguments
func (*PodtemplatespecBuilder) WithNodeSelectorByValue ¶
func (b *PodtemplatespecBuilder) WithNodeSelectorByValue(nodeselectors map[string]string) *PodtemplatespecBuilder
func (*PodtemplatespecBuilder) WithNodeSelectorNew ¶
func (b *PodtemplatespecBuilder) WithNodeSelectorNew(nodeselectors map[string]string) *PodtemplatespecBuilder
WithNodeSelectorNew resets the nodeselector field of podtemplatespec with provided arguments
func (*PodtemplatespecBuilder) WithPriorityClassName ¶
func (b *PodtemplatespecBuilder) WithPriorityClassName(prorityClassName string) *PodtemplatespecBuilder
WithPriorityClassName sets the PriorityClassName field of podtemplatespec
func (*PodtemplatespecBuilder) WithServiceAccountName ¶
func (b *PodtemplatespecBuilder) WithServiceAccountName(serviceAccountnNme string) *PodtemplatespecBuilder
WithServiceAccountName sets the ServiceAccountnNme field of podtemplatespec
func (*PodtemplatespecBuilder) WithTolerations ¶
func (b *PodtemplatespecBuilder) WithTolerations(tolerations ...corev1.Toleration) *PodtemplatespecBuilder
WithTolerations merges the existing tolerations with the provided arguments
func (*PodtemplatespecBuilder) WithTolerationsByValue ¶
func (b *PodtemplatespecBuilder) WithTolerationsByValue(tolerations ...corev1.Toleration) *PodtemplatespecBuilder
WithTolerationsByValue sets pod toleration. If provided tolerations argument is empty it does not complain.
func (*PodtemplatespecBuilder) WithTolerationsNew ¶
func (b *PodtemplatespecBuilder) WithTolerationsNew(tolerations ...corev1.Toleration) *PodtemplatespecBuilder
WithTolerationsNew sets the tolerations field of podtemplatespec
func (*PodtemplatespecBuilder) WithVolumeBuilders ¶
func (b *PodtemplatespecBuilder) WithVolumeBuilders( volumeBuilderList ...*VolumeBuilder, ) *PodtemplatespecBuilder
WithVolumeBuilders builds the list of volumebuilders provided and merges it to the volumes field of podtemplatespec.
func (*PodtemplatespecBuilder) WithVolumeBuildersNew ¶
func (b *PodtemplatespecBuilder) WithVolumeBuildersNew( volumeBuilderList ...*VolumeBuilder, ) *PodtemplatespecBuilder
WithVolumeBuildersNew builds the list of volumebuilders provided and sets Volumes field of podtemplatespec.
type PortMap ¶
func ListDevLink ¶
type PostgresApp ¶
type PostgresApp struct { Namespace string // Kubernetes namespace where the PostgreSQL application is deployed. Pod coreV1.Pod // Kubernetes Pod running the PostgreSQL application. VolUuid string // UUID of the provisioned volume for the PostgreSQL application. ReleaseName string // Helm release name for the PostgreSQL application. ReplicaCount int // Number of replicas for the PostgreSQL StatefulSet. ScName string // StorageClass name used for provisioning volumes. Standalone bool // Indicates if the PostgreSQL deployment is standalone. PvcName string // Name of the PersistentVolumeClaim. PgBench PgBenchApp // PgBench application configuration for benchmarking. }
PostgresApp represents a PostgreSQL application deployment configuration.
func (*PostgresApp) PostgresInstallReady ¶
func (psql *PostgresApp) PostgresInstallReady() error
PostgresInstallReady checks if the PostgreSQL application is installed and ready.
type PvcBuilder ¶
type PvcBuilder struct {
// contains filtered or unexported fields
}
PvcBuilder enables building an instance of PersistentVolumeClaim
func NewPvcBuilder ¶
func NewPvcBuilder() *PvcBuilder
NewPvcBuilder returns new instance of PvcBuilder
func (*PvcBuilder) Build ¶
func (b *PvcBuilder) Build() (*coreV1.PersistentVolumeClaim, error)
Build returns the StorageClass API instance
func (*PvcBuilder) BuildAndCreate ¶
func (b *PvcBuilder) BuildAndCreate() error
Build and create the StorageClass
func (*PvcBuilder) WithAccessModes ¶
func (b *PvcBuilder) WithAccessModes(mode coreV1.PersistentVolumeAccessMode) *PvcBuilder
WithAccessModes sets the accessModes field of pvc with provided argument.
func (*PvcBuilder) WithDataSourceApiGroup ¶
func (b *PvcBuilder) WithDataSourceApiGroup(dataSourceApiGroup string) *PvcBuilder
WithDataSourceApiGroup sets the data source aoi group field of pvc with provided argument.
func (*PvcBuilder) WithDataSourceKind ¶
func (b *PvcBuilder) WithDataSourceKind(dataSourceKind string) *PvcBuilder
WithDataSourceKind sets the data source kind field of pvc with provided argument.
func (*PvcBuilder) WithDataSourceName ¶
func (b *PvcBuilder) WithDataSourceName(dataSourceName string) *PvcBuilder
WithDataSourceName sets the data source name field of pvc with provided argument.
func (*PvcBuilder) WithName ¶
func (b *PvcBuilder) WithName(name string) *PvcBuilder
WithName sets the Name field of pvc with provided argument.
func (*PvcBuilder) WithNamespace ¶
func (b *PvcBuilder) WithNamespace(namespace string) *PvcBuilder
WithNamespace sets the Namespace field of pvc with provided argument.
func (*PvcBuilder) WithPvcSize ¶
func (b *PvcBuilder) WithPvcSize(size string) *PvcBuilder
WithPvcSize sets the size field of pvc with provided argument.
func (*PvcBuilder) WithStorageClass ¶
func (b *PvcBuilder) WithStorageClass(scName string) *PvcBuilder
WithStorageClass sets the storage class name field of pvc with provided argument.
func (*PvcBuilder) WithVolumeMode ¶
func (b *PvcBuilder) WithVolumeMode(volType common.VolumeType) *PvcBuilder
WithStorageClass sets the storage class name field of pvc with provided argument.
type RdmaDeviceNetworkInterface ¶
type RdmaDeviceNetworkInterface struct { IfIndex int `json:"ifindex"` IfName string `json:"ifname"` Port int `json:"port"` State string `json:"state"` PhysicalState string `json:"physical_state"` NetDev string `json:"netdev"` NetDevIndex int `json:"netdev_index"` }
func ListRdmaDevice ¶
func ListRdmaDevice(node string) ([]RdmaDeviceNetworkInterface, error)
type ReplicaMount ¶
type ReplicaMount struct { Spec ReplicaMountSpec Status ReplicaMountStatus }
func ConnectReplica ¶
func ConnectReplica(spec ReplicaMountSpec, maxRetries int) (*ReplicaMount, error)
func (*ReplicaMount) Unmount ¶
func (rm *ReplicaMount) Unmount() bool
type ReplicaMountSpec ¶
type ReplicaMountSpec struct {
// contains filtered or unexported fields
}
type ReplicaMountStatus ¶
type ReplicaMountStatus struct {
// contains filtered or unexported fields
}
type ScBuilder ¶
type ScBuilder struct {
// contains filtered or unexported fields
}
ScBuilder enables building an instance of StorageClass
func NewStorageClassBuilder ¶
func NewStorageClassBuilder() *ScBuilder
NewStorageClassBuilder returns new instance of ScBuilder
func (*ScBuilder) Build ¶
func (b *ScBuilder) Build() (*storagev1.StorageClass, error)
Build returns the StorageClass API instance
func (*ScBuilder) BuildAndCreate ¶
Build and create the StorageClass
func (*ScBuilder) WithAllowedTopologies ¶
func (b *ScBuilder) WithAllowedTopologies(value []v1.TopologySelectorTerm) *ScBuilder
WithLvmAllowedTopologies sets the allowedTopologies of storageclass to given argument.
func (*ScBuilder) WithAnnotations ¶
WithAnnotations sets the Annotations field of storageclass with provided value.
func (*ScBuilder) WithCloneFsIdAsVolumeId ¶
func (b *ScBuilder) WithCloneFsIdAsVolumeId(value common.CloneFsIdAsVolumeIdType) *ScBuilder
WithCloneFsIdAsVolumeId sets the cloneFsIdAsVolumeId parameter of storageclass with provided argument.
func (*ScBuilder) WithFileSystemType ¶
func (b *ScBuilder) WithFileSystemType(value common.FileSystemType) *ScBuilder
WithFileType sets the fsType parameter of storageclass with provided argument.
func (*ScBuilder) WithGenerateName ¶
WithGenerateName appends a random string after the name
func (*ScBuilder) WithIOTimeout ¶
WithIOTimeout sets the ioTimeout parameter of storageclass with provided argument.
func (*ScBuilder) WithLvmShared ¶
LVM WithLvmShared sets the shared parameter of storageclass with provided argument.
func (*ScBuilder) WithLvmStorage ¶
WithLvmStorage sets the storage parameter of storageclass to given argument.
func (*ScBuilder) WithLvmThinVol ¶
WithLvmThinVol sets the thinProvision parameter of storageclass to yes or no
func (*ScBuilder) WithLvmVgPattern ¶
WithLvmVgPattern sets the vgPattern parameter of storageclass with provided argument.
func (*ScBuilder) WithLvmVolGroup ¶
WithLvmVolGroup sets the volGroup parameter of storageclass with provided argument.
func (*ScBuilder) WithMaxSnapshots ¶
WithMaxSnapshots sets the maxSnapshots parameter of storageclass with provided argument.
func (*ScBuilder) WithMountOption ¶
func (*ScBuilder) WithMountOptions ¶
func (*ScBuilder) WithNamespace ¶
WithNamespace sets the namespace field of storageclass with provided argument.
func (*ScBuilder) WithNodeAffinityTopologyLabel ¶
func (*ScBuilder) WithNodeHasTopologyKey ¶
func (*ScBuilder) WithNodeSpreadTopologyKey ¶
func (*ScBuilder) WithNvmeCtrlLossTmo ¶
WithNvmeCtrlLossTmo sets the nvme controller loss timeout parameter of storageclass with provided argument.
func (*ScBuilder) WithPoolAffinityTopologyLabel ¶
func (*ScBuilder) WithPoolHasTopologyKey ¶
func (*ScBuilder) WithProtocol ¶
func (b *ScBuilder) WithProtocol(value common.ShareProto) *ScBuilder
WithProtocol sets the protocol parameter of storageclass with provided argument.
func (*ScBuilder) WithProvisioner ¶
WithProvisioner sets the Provisioner field of storageclass with provided argument.
func (*ScBuilder) WithProvisioningType ¶
func (b *ScBuilder) WithProvisioningType(provisioningType common.ProvisioningType) *ScBuilder
WithProvisioningType sets the thin provisioning field of storageclass with provided argument.
func (*ScBuilder) WithReclaimPolicy ¶
func (b *ScBuilder) WithReclaimPolicy(reclaimPolicy v1.PersistentVolumeReclaimPolicy) *ScBuilder
WithReclaimPolicy sets the reclaim policy field of storageclass with provided argument.
func (*ScBuilder) WithReplicas ¶
WithReplicas sets the replica parameter of storageclass with provided argument.
func (*ScBuilder) WithStsAffinityGroup ¶
func (b *ScBuilder) WithStsAffinityGroup(stsAffinity common.StsAffinityGroup) *ScBuilder
WithStsAffinityGroup sets the stsAffinityGroup field of storageclass with provided argument.
func (*ScBuilder) WithVolumeBindingMode ¶
func (b *ScBuilder) WithVolumeBindingMode(bindingMode storagev1.VolumeBindingMode) *ScBuilder
WithVolumeBindingMode sets the volume binding mode of storageclass with provided argument. VolumeBindingMode indicates how PersistentVolumeClaims should be bound. VolumeBindingImmediate indicates that PersistentVolumeClaims should be immediately provisioned and bound. This is the default mode. VolumeBindingWaitForFirstConsumer indicates that PersistentVolumeClaims should not be provisioned and bound until the first Pod is created that references the PeristentVolumeClaim. The volume provisioning and binding will occur during Pod scheduing.
func (*ScBuilder) WithVolumeExpansion ¶
func (b *ScBuilder) WithVolumeExpansion(value common.AllowVolumeExpansion) *ScBuilder
WithVolumeExpansion sets the AllowVolumeExpansion field of storageclass.
func (*ScBuilder) WithZfsCompression ¶
WithZfsCompression sets the compression parameter of storageclass with provided argument.
func (*ScBuilder) WithZfsDeDUp ¶
WithZfsDeDUp sets the dedup parameter of storageclass to given argument.
func (*ScBuilder) WithZfsPoolName ¶
WithZfsPoolName sets the poolname parameter of storageclass to given argument.
func (*ScBuilder) WithZfsRecordSize ¶
WithZfsRecordSize sets the recordsize parameter of storageclass with provided argument.
func (*ScBuilder) WithZfsShared ¶
ZFS WithZfsShared sets the shared parameter of storageclass with provided argument.
func (*ScBuilder) WithZfsThinVol ¶
WithZfsThinVol sets the thinProvision parameter of storageclass to yes or no
type ScFioVolumeName ¶
type ScFioVolumeName struct { VolName string Uuid string ScName string FioPodName string NexusNode string }
ScFioVolumeName holds the fio pod, storage class, volume names and uuid
func CreateScVolumeAndFio ¶
func CreateScVolumeAndFio(prefix string, replicaCount int, volSizeMb int, nodeName string, volType common.VolumeType) (ScFioVolumeName, error)
CreateScVolumeAndFio creates sc, volume and fio pod and return struct of volume name, volume uuid, sc name,fio pod name
type Statefulset ¶
type Statefulset struct {
// contains filtered or unexported fields
}
Statefulset is the wrapper over k8s statefulset Object
func (*Statefulset) IsNotSyncSpec ¶
func (d *Statefulset) IsNotSyncSpec() bool
IsNotSyncSpec compare generation in status and spec and check if statefulset spec is synced or not. If Generation <= Status.ObservedGeneration then statefulset spec is not updated yet.
func (*Statefulset) IsTerminationInProgress ¶
func (d *Statefulset) IsTerminationInProgress() bool
IsTerminationInProgress checks for older replicas are waiting to terminate or not. If Status.Replicas > Status.UpdatedReplicas then some of the older replicas are in running state because newer replicas are not in running state. It waits for newer replica to come into running state then terminate.
func (*Statefulset) IsUpdateInProgress ¶
func (d *Statefulset) IsUpdateInProgress() bool
IsUpdateInProgress Checks if all the replicas are updated or not. If Status.AvailableReplicas < Status.UpdatedReplicas then all the older replicas are not there but there are less number of availableReplicas
func (*Statefulset) VerifyReplicaStatus ¶
func (d *Statefulset) VerifyReplicaStatus() error
VerifyReplicaStatus verifies whether all the replicas of the statefulset are up and running
type StatefulsetBuilder ¶
type StatefulsetBuilder struct {
// contains filtered or unexported fields
}
Builder enables building an instance of statefulset
func NewStatefulsetBuilder ¶
func NewStatefulsetBuilder() *StatefulsetBuilder
NewBuilder returns a new instance of builder meant for statefulset
func (*StatefulsetBuilder) Build ¶
func (b *StatefulsetBuilder) Build() (*appsv1.StatefulSet, error)
Build returns a statefulset instance
func (*StatefulsetBuilder) WithLabels ¶
func (b *StatefulsetBuilder) WithLabels(labels map[string]string) *StatefulsetBuilder
WithLabels sets the label field of statefulset with provided value.
func (*StatefulsetBuilder) WithName ¶
func (b *StatefulsetBuilder) WithName(name string) *StatefulsetBuilder
WithName sets the Name field of statefulset with provided value.
func (*StatefulsetBuilder) WithNamespace ¶
func (b *StatefulsetBuilder) WithNamespace(namespace string) *StatefulsetBuilder
WithNamespace sets the Namespace field of statefulset with provided value.
func (*StatefulsetBuilder) WithNodeSelector ¶
func (b *StatefulsetBuilder) WithNodeSelector(selector map[string]string) *StatefulsetBuilder
WithNodeSelector Sets the node selector with the provided argument.
func (*StatefulsetBuilder) WithPodManagementPolicy ¶
func (b *StatefulsetBuilder) WithPodManagementPolicy(policy appsv1.PodManagementPolicyType) *StatefulsetBuilder
WithPodManagementPolicy sets the spec.podManagementPolicy field of statefulset
func (*StatefulsetBuilder) WithPodTemplateSpecBuilder ¶
func (b *StatefulsetBuilder) WithPodTemplateSpecBuilder( tmplbuilder *PodtemplatespecBuilder, ) *StatefulsetBuilder
WithPodTemplateSpecBuilder sets the template field of the statefulset
func (*StatefulsetBuilder) WithReplicas ¶
func (b *StatefulsetBuilder) WithReplicas(replicas *int32) *StatefulsetBuilder
WithReplicas sets the replica field of statefulset
func (*StatefulsetBuilder) WithSelectorMatchLabels ¶
func (b *StatefulsetBuilder) WithSelectorMatchLabels(matchlabels map[string]string) *StatefulsetBuilder
WithSelectorMatchLabels set the selector labels field of statefulset with provided value.
func (*StatefulsetBuilder) WithVolumeClaimTemplate ¶
func (b *StatefulsetBuilder) WithVolumeClaimTemplate(name, storage, storageClassName string, volType common.VolumeType) *StatefulsetBuilder
WithVolumeClaimTemplate sets the volumeClaimTemplate in statefulset to create volume claims according to no of statefulset replicas
type StorageClass ¶
type StorageClass struct {
// contains filtered or unexported fields
}
type TestEnvironment ¶
type TestEnvironment struct { KubeInt kubernetes.Interface CsiInt clientset.Interface }
type Volume ¶
type Volume struct {
// contains filtered or unexported fields
}
Volume is a wrapper over named volume api object, used within Pods. It provides build, validations and other common logic to be used by various feature specific callers.
type VolumeBuilder ¶
type VolumeBuilder struct {
// contains filtered or unexported fields
}
Builder is the builder object for Volume
func NewVolumeBuilder ¶
func NewVolumeBuilder() *VolumeBuilder
NewBuilder returns new instance of Builder
func (*VolumeBuilder) Build ¶
func (b *VolumeBuilder) Build() (*corev1.Volume, error)
Build returns the Volume API instance
func (*VolumeBuilder) WithConfigMap ¶
func (b *VolumeBuilder) WithConfigMap(configMap *corev1.ConfigMap, defaultMode int32) *VolumeBuilder
WithConfigMap sets the VolumeSource field of Volume with provided ConfigMap
func (*VolumeBuilder) WithEmptyDir ¶
func (b *VolumeBuilder) WithEmptyDir(dir *corev1.EmptyDirVolumeSource) *VolumeBuilder
WithEmptyDir sets the EmptyDir field of the Volume with provided dir
func (*VolumeBuilder) WithHostDirectory ¶
func (b *VolumeBuilder) WithHostDirectory(path string) *VolumeBuilder
WithHostDirectory sets the VolumeSource field of Volume with provided hostpath as type directory.
func (*VolumeBuilder) WithHostPathAndType ¶
func (b *VolumeBuilder) WithHostPathAndType( dirpath string, dirtype *corev1.HostPathType, ) *VolumeBuilder
WithHostPathAndType sets the VolumeSource field of Volume with provided hostpath as directory path and type as directory type
func (*VolumeBuilder) WithName ¶
func (b *VolumeBuilder) WithName(name string) *VolumeBuilder
WithName sets the Name field of Volume with provided value.
func (*VolumeBuilder) WithPVCSource ¶
func (b *VolumeBuilder) WithPVCSource(pvcName string) *VolumeBuilder
WithPVCSource sets the Volume field of Volume with provided pvc
func (*VolumeBuilder) WithSecret ¶
func (b *VolumeBuilder) WithSecret(secret *corev1.Secret, defaultMode int32) *VolumeBuilder
WithSecret sets the VolumeSource field of Volume with provided Secret
type YcsbApp ¶
type YcsbApp struct { BenchmarkParams BenchmarkParams MongoConnUrl string Name string Namespace string NodeSelector string PodName string }
func (*YcsbApp) DeployYcsbApp ¶
func (*YcsbApp) LoadYcsbApp ¶
func (*YcsbApp) RunYcsbApp ¶
func (*YcsbApp) UndeployYcsbApp ¶
Source Files
¶
- mayastor_check.go
- msn.go
- msp.go
- msv.go
- test.go
- util.go
- util_apps.go
- util_busybox.go
- util_cleanup.go
- util_cluster.go
- util_configmap.go
- util_container.go
- util_daemonset.go
- util_deploy.go
- util_e2e_agent.go
- util_events.go
- util_fio_app.go
- util_fiostsapp.go
- util_helm.go
- util_loop_device.go
- util_mongo_apps.go
- util_nexus.go
- util_node.go
- util_pod.go
- util_podtemplatespec.go
- util_pool.go
- util_postgres_app.go
- util_pvc.go
- util_rdma.go
- util_replica.go
- util_service.go
- util_snapshot.go
- util_storageclass.go
- util_sts.go
- util_testpods.go
- util_volume.go
- util_volume_replicas.go