volumehelper

package
v1.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package volumehelper contains consts and helper methods used by various volume components (attach/detach controller, kubelet, etc.).

Index

Constants

View Source
const (
	// 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
	ControllerManagedAttachAnnotation string = "volumes.kubernetes.io/controller-managed-attach-detach"

	// VolumeGidAnnotationKey is the of the annotation on the PersistentVolume
	// object that specifies a supplemental GID.
	VolumeGidAnnotationKey = "pv.beta.kubernetes.io/gid"
)

Variables

This section is empty.

Functions

func GetUniquePodName

func GetUniquePodName(pod *api.Pod) types.UniquePodName

GetUniquePodName returns a unique identifier to reference a pod by

func GetUniqueVolumeName

func GetUniqueVolumeName(pluginName, volumeName string) api.UniqueVolumeName

GetUniqueVolumeName returns a unique name representing the volume/plugin. Caller should ensure that volumeName is a name/ID uniquely identifying the actual backing device, directory, path, etc. for a particular volume. The returned name can be used to uniquely reference the volume, for example, to prevent operations (attach/detach or mount/unmount) from being triggered on the same volume.

func GetUniqueVolumeNameForNonAttachableVolume added in v1.3.4

func GetUniqueVolumeNameForNonAttachableVolume(
	podName types.UniquePodName, volumePlugin volume.VolumePlugin, volumeSpec *volume.Spec) api.UniqueVolumeName

GetUniqueVolumeNameForNonAttachableVolume returns the unique volume name for a non-attachable volume.

func GetUniqueVolumeNameFromSpec

func GetUniqueVolumeNameFromSpec(
	volumePlugin volume.VolumePlugin,
	volumeSpec *volume.Spec) (api.UniqueVolumeName, error)

GetUniqueVolumeNameFromSpec uses the given VolumePlugin to generate a unique name representing the volume defined in the specified volume spec. This returned name can be used to uniquely reference the actual backing device, directory, path, etc. referenced by the given volumeSpec. If the given plugin does not support the volume spec, this returns an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL