package
1.14.0-alpha.1
Repository: https://github.com/micnncim/kubernetes.git
Documentation: pkg.go.dev

# 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.
CheckPersistentVolumeClaimModeBlock checks VolumeMode.
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.
GenericResizeFS : call generic filesystem resizer for plugins that don't have any special filesystem resize requirements.
GetClassForVolume locates storage class by persistent volume.
GetCSIAttachLimitKey returns limit key used for CSI volumes.
GetFullQualifiedPluginNameForVolume returns full qualified plugin name for given volume.
GetPath checks if the path from the mounter is empty.
GetPersistentVolumeClaimQualifiedName returns a qualified name for pvc.
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.
GetUniqueVolumeNameFromSpec uses the given VolumePlugin to generate a unique name representing the volume defined in the specified volume spec.
GetUniqueVolumeNameFromSpecWithPod returns a unique volume name with pod name included.
GetVolumeMode retrieves VolumeMode from pv.
GetWindowsPath get a windows path.
IsCorruptedMnt return true if err is about corrupted mount point TODO: Change callers to call mount pkg directly.
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.
IsWindowsLocalPath checks if path is a local path prefixed with "/" or "\" like "/foo/bar" or "\foo\bar".
IsWindowsUNCPath checks if path is prefixed with \\ This can be used to skip any processing of paths that point to SMB shares, local named pipes and local UNC path.
JoinMountOptions joins mount options eliminating duplicates.
LabelZonesToList converts a PV label value from string containing a delimited list of zones to list.
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.
MapBlockVolume is a utility function to provide a common way of mounting block device path for a specified volume and pod.
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.
NewDanglingError create a new dangling error.
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.
RoundUpSizeInt calculates how many allocation units are needed to accommodate a volume of given size.
RoundUpToGB rounds up given quantity to chunks of GB.
RoundUpToGBInt rounds up given quantity to chunks of GB.
RoundUpToGiB rounds up given quantity upto chunks of GiB.
RoundUpToGiBInt rounds up given quantity upto chunks of GiB.
SelectZoneForVolume is a wrapper around SelectZonesForVolume to select a single zone for a volume based on parameters.
SelectZonesForVolume selects zones for a volume based on several factors: node.zone, allowedTopologies, zone/zones parameters from storageclass, zones with active nodes from the cluster.
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.
ZonesFromAllowedTopologies returns a list of zones specified in allowedTopologies.
ZonesSetToLabelValue converts zones set to label value.
ZonesToSet converts a string containing a comma separated list of zones to set.

# Constants

AzureVolumeLimitKey stores resource name that will store volume limits for Azure.
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.
CSIAttachLimitPrefix defines prefix used for CSI volumes.
DefaultMaxEBSNitroVolumeLimit is default EBS volume limit on m5 and c5 instances.
DefaultMaxEBSVolumes is the limit for volumes attached to an instance.
EBSNitroLimitRegex finds nitro instance types with different limit than EBS defaults.
EBSVolumeLimitKey resource name that will store volume limits for EBS.
GB - GigaByte size.
GCEVolumeLimitKey stores resource name that will store volume limits for GCE node.
GIB - GibiByte size.
KeepTerminatedPodVolumesAnnotation is the key of the annotation on Node that decides if pod volumes are unmounted when pod is terminated.
PVCProtectionFinalizer is the name of finalizer on PVCs that have a running pod.
PVProtectionFinalizer is the name of finalizer on PVs that are bound by PVCs.
ResourceNameLengthLimit stores maximum allowed Length for a ResourceName.
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.
DanglingAttachError indicates volume is attached to a different node than we expected.
FileProjection contains file Data and access Mode.
VolumeZoneConfig contains config information about zonal volume.

# Interfaces

DeviceUtil is a util for common device methods.
IoUtil is a mockable util for common IO operations.