kubernetes/test/e2e/storage/persistent_volumes-local.go

type localTestConfig

type localVolumeType

const DirectoryLocalVolumeType

const DirectoryLinkLocalVolumeType

const DirectoryBindMountedLocalVolumeType

const DirectoryLinkBindMountedLocalVolumeType

const TmpfsLocalVolumeType

const GCELocalSSDVolumeType

const BlockLocalVolumeType

const BlockFsWithFormatLocalVolumeType

const BlockFsWithoutFormatLocalVolumeType

var setupLocalVolumeMap

type localTestVolume

const hostBase

const volumeDir

const testFile

const testFileContent

const testSCPrefix

const testRequestSize

const maxNodes

var waitMode

var immediateMode

var selinuxLabel

var _

func deletePodAndPVCs(ctx context.Context, config *localTestConfig, pod *v1.Pod) error {}

type makeLocalPodWith

func testPodWithNodeConflict(ctx context.Context, config *localTestConfig, testVol *localTestVolume, nodeName string, makeLocalPodFunc makeLocalPodWith) {}

// Test two pods at the same time, write from pod1, and read from pod2
func twoPodsReadWriteTest(ctx context.Context, f *framework.Framework, config *localTestConfig, testVol *localTestVolume) {}

// Test two pods one after other, write from pod1, and read from pod2
func twoPodsReadWriteSerialTest(ctx context.Context, f *framework.Framework, config *localTestConfig, testVol *localTestVolume) {}

// Test creating pod with fsGroup, and check fsGroup is expected fsGroup.
func createPodWithFsGroupTest(ctx context.Context, config *localTestConfig, testVol *localTestVolume, fsGroup int64, expectedFsGroup int64) *v1.Pod {}

func setupStorageClass(ctx context.Context, config *localTestConfig, mode *storagev1.VolumeBindingMode) {}

func cleanupStorageClass(ctx context.Context, config *localTestConfig) {}

// podNode wraps RunKubectl to get node where pod is running
func podNodeName(ctx context.Context, config *localTestConfig, pod *v1.Pod) (string, error) {}

// setupLocalVolumes sets up directories to use for local PV
func setupLocalVolumes(ctx context.Context, config *localTestConfig, localVolumeType localVolumeType, node *v1.Node, count int) []*localTestVolume {}

func cleanupLocalPVCsPVs(ctx context.Context, config *localTestConfig, volumes []*localTestVolume) {}

// Deletes the PVC/PV, and launches a pod with hostpath volume to remove the test directory
func cleanupLocalVolumes(ctx context.Context, config *localTestConfig, volumes []*localTestVolume) {}

func verifyLocalVolume(ctx context.Context, config *localTestConfig, volume *localTestVolume) {}

func verifyLocalPod(ctx context.Context, config *localTestConfig, volume *localTestVolume, pod *v1.Pod, expectedNodeName string) {}

func makeLocalPVCConfig(config *localTestConfig, volumeType localVolumeType) e2epv.PersistentVolumeClaimConfig {}

func makeLocalPVConfig(config *localTestConfig, volume *localTestVolume) e2epv.PersistentVolumeConfig {}

// Creates a PVC and PV with prebinding
func createLocalPVCsPVs(ctx context.Context, config *localTestConfig, volumes []*localTestVolume, mode storagev1.VolumeBindingMode) {}

func makeLocalPodWithNodeAffinity(config *localTestConfig, volume *localTestVolume, nodeName string) (pod *v1.Pod) {}

func makeLocalPodWithNodeSelector(config *localTestConfig, volume *localTestVolume, nodeName string) (pod *v1.Pod) {}

func makeLocalPodWithNodeName(config *localTestConfig, volume *localTestVolume, nodeName string) (pod *v1.Pod) {}

func createLocalPod(ctx context.Context, config *localTestConfig, volume *localTestVolume, fsGroup *int64) (*v1.Pod, error) {}

func createWriteCmd(testDir string, testFile string, writeTestFileContent string, volumeType localVolumeType) string {}

func createReadCmd(testFileDir string, testFile string, volumeType localVolumeType) string {}

// Read testFile and evaluate whether it contains the testFileContent
func testReadFileContent(f *framework.Framework, testFileDir string, testFile string, testFileContent string, pod *v1.Pod, volumeType localVolumeType) {}

// Execute a read or write command in a pod.
// Fail on error
func podRWCmdExec(f *framework.Framework, pod *v1.Pod, cmd string) string {}

// Initialize test volume on node
// and create local PVC and PV
func setupLocalVolumesPVCsPVs(
	ctx context.Context,
	config *localTestConfig,
	localVolumeType localVolumeType,
	node *v1.Node,
	count int,
	mode storagev1.VolumeBindingMode) []*localTestVolume {}

// newLocalClaim creates a new persistent volume claim.
func newLocalClaimWithName(config *localTestConfig, name string) *v1.PersistentVolumeClaim {}

func createStatefulSet(ctx context.Context, config *localTestConfig, ssReplicas int32, volumeCount int, anti, parallel bool) *appsv1.StatefulSet {}

func validateStatefulSet(ctx context.Context, config *localTestConfig, ss *appsv1.StatefulSet, anti bool) {}

// SkipUnlessLocalSSDExists takes in an ssdInterface (scsi/nvme) and a filesystemType (fs/block)
// and skips if a disk of that type does not exist on the node
func SkipUnlessLocalSSDExists(ctx context.Context, config *localTestConfig, ssdInterface, filesystemType string, node *v1.Node) {}