Documentation ¶
Overview ¶
Package volume includes internal representations of external volume types as well as utility methods required to mount/unmount volumes to kubelets.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrUnsupportedVolumeType = errors.New("unsupported volume type")
Functions ¶
func GetCurrentVolumes ¶
Examines directory structure to determine volumes that are presently active and mounted. Returns a map of Cleaner types.
Types ¶
type Builder ¶
type Builder interface { // Uses Interface to provide the path for Docker binds. Interface // SetUp prepares and mounts/unpacks the volume to a directory path. SetUp() error }
The Builder interface provides the method to set up/mount the volume.
type Cleaner ¶
type Cleaner interface { // TearDown unmounts the volume and removes traces of the SetUp procedure. TearDown() error }
The Cleaner interface provides the method to cleanup/unmount the volumes.
type EmptyDirectory ¶
EmptyDirectory volumes are temporary directories exposed to the pod. These do not persist beyond the lifetime of a pod.
func (*EmptyDirectory) GetPath ¶
func (emptyDir *EmptyDirectory) GetPath() string
func (*EmptyDirectory) SetUp ¶
func (emptyDir *EmptyDirectory) SetUp() error
SetUp creates the new directory.
func (*EmptyDirectory) TearDown ¶
func (emptyDir *EmptyDirectory) TearDown() error
Simply delete everything in the directory.
type HostDirectory ¶
type HostDirectory struct {
Path string
}
Host Directory volumes represent a bare host directory mount. The directory in Path will be directly exposed to the container.
func (*HostDirectory) GetPath ¶
func (hostVol *HostDirectory) GetPath() string
func (*HostDirectory) SetUp ¶
func (hostVol *HostDirectory) SetUp() error
Host directory mounts require no setup or cleanup, but still need to fulfill the interface definitions.