# Packages
No description provided by the author
Package nestedpendingoperations is a modified implementation of
pkg/util/goroutinemap.
Package operationexecutor implements interfaces that enable execution of attach, detach, mount, and unmount operations with a nestedpendingoperations so that more than one operation is never triggered on the same volume for the same pod.
No description provided by the author
Package types defines types used only by volume components.
No description provided by the author
# Functions
AccessModesContainedInAll returns whether all of the requested modes are contained by modes.
AccessModesContains returns whether the requested mode is contained by modes.
CalculateTimeoutForVolume calculates time for a Recycler pod to complete a recycle operation.
CheckNodeAffinity looks at the PV node affinity, and checks if the node has the same corresponding labels This ensures that we don't mount a volume that doesn't belong to this node.
CheckVolumeModeFilesystem checks VolumeMode.
ChooseZoneForVolume implements our heuristics for choosing a zone for volume creation based on the volume name Volumes are generally round-robin-ed across all active zones, using the hash of the PVC Name.
ChooseZonesForVolume is identical to ChooseZoneForVolume, but selects a multiple zones, for multi-zone disks.
ClaimToClaimKey return namespace/name string for pvc.
GenerateVolumeName returns a PV name with clusterName prefix.
No description provided by the author
GetPath checks if the path from the mounter is empty.
GetPersistentVolumeClaimVolumeMode retrieves VolumeMode from pvc.
GetSecretForPod locates secret by name in the pod's namespace and returns secret map.
GetSecretForPV locates secret by name and namespace, verifies the secret type, and returns secret map.
GetUniquePodName returns a unique identifier to reference a pod by.
GetUniqueVolumeName returns a unique name representing the volume/plugin.
GetUniqueVolumeNameForNonAttachableVolume returns the unique volume name for a non-attachable volume.
GetUniqueVolumeNameFromSpec uses the given VolumePlugin to generate a unique name representing the volume defined in the specified volume spec.
GetVolumeMode retrieves VolumeMode from pv.
GetWindowsPath get a windows path.
IsPodTerminated checks if pod is terminated.
IsReady checks for the existence of a regular file called 'ready' in the given directory and returns true if that file exists.
JoinMountOptions joins mount options eliminating duplicates.
LabelZonesToSet converts a PV label value from string containing a delimited list of zones to set.
LoadPodFromFile will read, decode, and return a Pod from a file.
MakeAbsolutePath convert path to absolute path according to GOOS.
MakeNestedMountpoints creates mount points in baseDir for volumes mounted beneath name.
MarkFSResizeFinished marks file system resizing as done.
MergeResizeConditionOnPVC updates pvc with requested resize conditions leaving other conditions untouched.
MountOptionFromSpec extracts and joins mount options from volume spec with supplied options.
NewAtomicWriter creates a new AtomicWriter configured to write to the given target directory, or returns an error if the target directory does not exist.
No description provided by the author
NewDeviceHandler Create a new IoHandler implementation.
NewIOHandler Create a new IoHandler implementation.
NewSafeFormatAndMountFromHost creates a new SafeFormatAndMount with Mounter and Exec taken from given VolumeHost.
OperationCompleteHook returns a hook to call when an operation is completed.
PatchPVCStatus updates PVC status using PATCH verb.
PathExists returns true if the specified path exists.
RoundUpSize calculates how many allocation units are needed to accommodate a volume of given size.
RoundUpToGB rounds up given quantity to chunks of GB.
RoundUpToGiB rounds up given quantity upto chunks of GiB.
SetReady creates a file called 'ready' in the given directory.
SplitUniqueName splits the unique name to plugin name and volume name strings.
UnmountMountPoint is a common unmount routine that unmounts the given path and deletes the remaining directory if successful.
UnmountPath is a common unmount routine that unmounts the given path and deletes the remaining directory if successful.
UnmountViaEmptyDir delegates the tear down operation for secret, configmap, git_repo and downwardapi to empty_dir.
ValidateZone returns: - an error in case zone is an empty string or contains only any combination of spaces and tab characters - nil otherwise.
No description provided by the author
ZonesToSet converts a string containing a comma separated list of zones to set.
# Constants
ControllerManagedAttachAnnotation is the key of the annotation on Node objects that indicates attach/detach operations for the node should be managed by the attach/detach controller.
GB - GigaByte size.
GIB - GibiByte size.
KeepTerminatedPodVolumesAnnotation is the key of the annotation on Node that decides if pod volumes are unmounted when pod is terminated.
Name of finalizer on PVCs that have a running pod.
Name of finalizer on PVs that are bound by PVCs.
VolumeDynamicallyCreatedByKey is the key of the annotation on PersistentVolume object created dynamically.
VolumeGidAnnotationKey is the of the annotation on the PersistentVolume object that specifies a supplemental GID.
# Structs
AtomicWriter handles atomically projecting content for a set of files into a target directory.
This error on attach indicates volume is attached to a different node than we expected.
No description provided by the author
# Interfaces
DeviceUtil is a util for common device methods.
IoUtil is a mockable util for common IO operations.