volumemanager

package
v1.3.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2016 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VolumeManager added in v1.3.0

type VolumeManager interface {
	// Starts the volume manager and all the asynchronous loops that it controls
	Run(stopCh <-chan struct{})

	// WaitForAttachAndMount processes the volumes referenced in the specified
	// pod and blocks until they are all attached and mounted (reflected in
	// actual state of the world).
	// An error is returned if all volumes are not attached and mounted within
	// the duration defined in podAttachAndMountTimeout.
	WaitForAttachAndMount(pod *api.Pod) error

	// GetMountedVolumesForPod returns a VolumeMap containing the volumes
	// referenced by the specified pod that are successfully attached and
	// mounted. The key in the map is the OuterVolumeSpecName (i.e.
	// pod.Spec.Volumes[x].Name). It returns an empty VolumeMap if pod has no
	// volumes.
	GetMountedVolumesForPod(podName types.UniquePodName) container.VolumeMap

	// GetVolumesForPodAndApplySupplementalGroups, like GetVolumesForPod returns
	// a VolumeMap containing the volumes referenced by the specified pod that
	// are successfully attached and mounted. The key in the map is the
	// OuterVolumeSpecName (i.e. pod.Spec.Volumes[x].Name).
	// It returns an empty VolumeMap if pod has no volumes.
	// In addition for every volume that specifies a VolumeGidValue, it appends
	// the SecurityContext.SupplementalGroups for the specified pod.
	// XXX: https://github.com/kubernetes/kubernetes/issues/27197 mutating the
	// pod object is bad, and should be avoided.
	GetVolumesForPodAndAppendSupplementalGroups(pod *api.Pod) container.VolumeMap

	// Returns a list of all volumes that are currently attached according to
	// the actual state of the world cache and implement the volume.Attacher
	// interface.
	GetVolumesInUse() []api.UniqueVolumeName
}

VolumeManager runs a set of asynchronous loops that figure out which volumes need to be attached/mounted/unmounted/detached based on the pods scheduled on this node and makes it so.

func NewVolumeManager added in v1.3.0

func NewVolumeManager(
	controllerAttachDetachEnabled bool,
	hostName string,
	podManager pod.Manager,
	kubeClient internalclientset.Interface,
	volumePluginMgr *volume.VolumePluginMgr) (VolumeManager, error)

NewVolumeManager returns a new concrete instance implementing the VolumeManager interface.

kubeClient - kubeClient is the kube API client used by DesiredStateOfWorldPopulator

to communicate with the API server to fetch PV and PVC objects

volumePluginMgr - the volume plugin manager used to access volume plugins.

Must be pre-initialized.

Directories

Path Synopsis
Package cache implements data structures used by the kubelet volume manager to keep track of attached volumes and the pods that mounted them.
Package cache implements data structures used by the kubelet volume manager to keep track of attached volumes and the pods that mounted them.
Package populator implements interfaces that monitor and keep the states of the caches in sync with the "ground truth".
Package populator implements interfaces that monitor and keep the states of the caches in sync with the "ground truth".
Package reconciler implements interfaces that attempt to reconcile the desired state of the with the actual state of the world by triggering relevant actions (attach, detach, mount, unmount).
Package reconciler implements interfaces that attempt to reconcile the desired state of the with the actual state of the world by triggering relevant actions (attach, detach, mount, unmount).

Jump to

Keyboard shortcuts

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