package
1.33.0-alpha.2
Repository: https://github.com/kubernetes/kubernetes.git
Documentation: pkg.go.dev
# Functions
ChangeFilePathGIDInPod changes the GID of the target filepath.
CheckReadFromPath validate that file can be properly read.
CheckReadWriteToPath check that path can b e read and written.
CheckWriteToPath that file can be properly written.
CreateDriverNamespace creates a namespace for CSI driver installation.
CreateFromManifests is a combination of LoadFromManifests, PatchItems, patching with an optional custom function, and CreateItems.
CreateItems creates the items.
CreateVolumeSource creates a volume source object.
DeleteAndWaitSnapshot deletes a VolumeSnapshot and waits for it to be deleted or until timeout occurs, whichever comes first.
DeleteSnapshotWithoutWaiting deletes a VolumeSnapshot and return directly without waiting.
DeleteStorageClass deletes the passed in StorageClass and catches errors other than "Not Found".
EnsureGVRDeletion checks that no object as defined by the group/version/kind and name is ever found during the given time period.
EnsureNoGVRDeletion checks that an object as defined by the group/version/kind and name has not been deleted during the given time period.
FindVolumeGlobalMountPoints returns all volume global mount points on the node of given pod.
GenerateSnapshotClassSpec constructs a new SnapshotClass instance spec with a unique name that is based on namespace + suffix.
GetSectorSize returns the sector size of the device.
GetSizeRangesIntersection takes two instances of storage size ranges and determines the intersection of the intervals (if it exists) and return the minimum of the intersection to be used as the claim size for the test.
GetSnapshotContentFromSnapshot returns the VolumeSnapshotContent object Bound to a given VolumeSnapshot.
KubeletCommand performs `start`, `restart`, or `stop` on the kubelet running on the node of the target pod and waits for the desired statues.
LoadFromManifests loads .yaml or .json manifest files and returns all items that it finds in them.
LogResult records result log.
NewHostExec returns a HostExec.
NewLocalResourceManager returns a instance of LocalTestResourceManager.
PatchCSIDeployment modifies the CSI driver deployment: - replaces the provisioner name - forces pods onto a specific host
All of that is optional, see PatchCSIOptions.
PatchItems modifies the given items in place such that each test gets its own instances, to avoid conflicts between different tests and between tests and normal deployments.
PatchName makes the name of some item unique by appending the generated unique name.
PatchNamespace moves the item into the test's namespace.
PrettyPrint returns a human-readable representation of an item.
RunInPodWithVolume runs a command in a pod with given claim mounted to /mnt directory.
StartExternalProvisioner create external provisioner pod.
StartPodLogs begins capturing log output and events from current and future pods running in the namespace of the framework.
TestKubeletRestartsAndRestoresMap tests that a volume mapped to a pod remains mapped after a kubelet restarts.
TestKubeletRestartsAndRestoresMount tests that a volume mounted to a pod remains mounted after a kubelet restarts.
TestVolumeUnmapsFromDeletedPod tests that a volume unmaps if the client pod was deleted while the kubelet was down.
TestVolumeUnmapsFromDeletedPodWithForceOption tests that a volume unmaps if the client pod was deleted while the kubelet was down.
TestVolumeUnmapsFromForceDeletedPod tests that a volume unmaps if the client pod was forcefully deleted while the kubelet was down.
TestVolumeUnmountsFromDeletedPod tests that a volume unmounts if the client pod was deleted while the kubelet was down.
TestVolumeUnmountsFromDeletedPodWithForceOption tests that a volume unmounts if the client pod was deleted while the kubelet was down.
TestVolumeUnmountsFromForceDeletedPod tests that a volume unmounts if the client pod was forcefully deleted while the kubelet was down.
TryFunc try to execute the function and return err if there is any.
VerifyFilePathGIDInPod verfies expected GID of the target filepath.
VerifyFSGroupInPod verifies that the passed in filePath contains the expectedFSGroup.
WaitForGVRDeletion waits until a non-namespaced object has been deleted.
WaitForGVRFinalizer waits until a object from a given GVR contains a finalizer If namespace is empty, assume it is a non-namespaced object.
WaitForNamespacedGVRDeletion waits until a namespaced object has been deleted.
WaitForSnapshotReady waits for a VolumeSnapshot to be ready to use or until timeout occurs, whichever comes first.
WaitForVolumeGroupSnapshotReady waits for a VolumeGroupSnapshot to be ready to use or until timeout occurs, whichever comes first.
WaitUntil runs checkDone until a timeout is reached.
# Constants
KRestart defines restart value.
KStart defines start value.
KStop defines stop value.
LocalVolumeBlock represents a Block device, creates a local file, and maps it as a block device.
LocalVolumeBlockFS represents a filesystem backed by a block device.
LocalVolumeDirectory reprensents a simple directory as local volume.
LocalVolumeDirectoryBindMounted is like LocalVolumeDirectory but bind mounted.
LocalVolumeDirectoryLink is like LocalVolumeDirectory but it's a symbolic link to directory.
LocalVolumeDirectoryLinkBindMounted is like LocalVolumeDirectory but it's a symbolic link to self bind mounted directory Note that bind mounting at symbolic link actually mounts at directory it links to.
LocalVolumeGCELocalSSD represents a Filesystem backed by GCE Local SSD as local volume.
LocalVolumeTmpfs represents a temporary filesystem to be used as local volume.
NodeStateTimeout defines Timeout.
SnapshotAPIVersion is the snapshot CRD api version.
SnapshotGroup is the snapshot CRD api group.
VolumeGroupSnapshot is the group snapshot api.
VolumeGroupSnapshotAPIVersion is the group snapshot api version.
# Variables
SIGDescribe annotates the test with the SIG label.
SnapshotClassGVR is GroupVersionResource for volumesnapshotclasses.
SnapshotContentGVR is GroupVersionResource for volumesnapshotcontents.
SnapshotGVR is GroupVersionResource for volumesnapshots.
VolumeGroupSnapshotClassGVR is GroupVersionResource for volumegroupsnapshotsclasses.
VolumeGroupSnapshotGVR is GroupVersionResource for volumegroupsnapshots.
# Structs
LocalTestResource represents test resource of a local volume.
PatchCSIOptions controls how PatchCSIDeployment patches the objects.
Result holds the execution result of remote execution command.
What is a subset of metav1.TypeMeta which (in contrast to metav1.TypeMeta itself) satisfies the runtime.Object interface.
# Interfaces
HostExec represents interface we require to execute commands on remote host.
ItemFactory provides support for creating one particular item.
LocalTestResourceManager represents interface to create/destroy local test resources on node.
# Type aliases
KubeletOpt type definition.
LocalVolumeType represents type of local volume, e.g.