kubernetesk8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler Index | Files

package reconciler

import "k8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler"

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).

Index

Types

type Reconciler

type Reconciler interface {
	// Starts running the reconciliation loop which executes periodically, checks
	// if volumes that should be mounted are mounted and volumes that should
	// be unmounted are unmounted. If not, it will trigger mount/unmount
	// operations to rectify.
	// If attach/detach management is enabled, the manager will also check if
	// volumes that should be attached are attached and volumes that should
	// be detached are detached and trigger attach/detach operations as needed.
	Run(sourcesReady config.SourcesReady, stopCh <-chan struct{})
}

Reconciler runs a periodic loop to reconcile the desired state of the world with the actual state of the world by triggering attach, detach, mount, and unmount operations. Note: This is distinct from the Reconciler implemented by the attach/detach controller. This reconciles state for the kubelet volume manager. That reconciles state for the attach/detach controller.

func NewReconciler

func NewReconciler(
	kubeClient internalclientset.Interface,
	controllerAttachDetachEnabled bool,
	loopSleepDuration time.Duration,
	reconstructDuration time.Duration,
	waitForAttachTimeout time.Duration,
	hostName string,
	desiredStateOfWorld cache.DesiredStateOfWorld,
	actualStateOfWorld cache.ActualStateOfWorld,
	operationExecutor operationexecutor.OperationExecutor,
	mounter mount.Interface,
	volumePluginMgr *volume.VolumePluginMgr,
	kubeletPodsDir string) Reconciler

NewReconciler returns a new instance of Reconciler.

controllerAttachDetachEnabled - if true, indicates that the attach/detach

controller is responsible for managing the attach/detach operations for
this node, and therefore the volume manager should not

loopSleepDuration - the amount of time the reconciler loop sleeps between

successive executions
reconstructDuration - the amount of time the reconstruct sleeps between
successive executions

waitForAttachTimeout - the amount of time the Mount function will wait for

the volume to be attached

hostName - the hostname for this node, used by Attach and Detach methods desiredStateOfWorld - cache containing the desired state of the world actualStateOfWorld - cache containing the actual state of the world operationExecutor - used to trigger attach/detach/mount/unmount operations

safely (prevents more than one operation from being triggered on the same
volume)

mounter - mounter passed in from kubelet, passed down unmount path volumePluginMrg - volume plugin manager passed from kubelet

Source Files

reconciler.go

Version
v1.4.3
Published
Oct 16, 2016
Platform
js/wasm
Imports
20 packages
Last checked
9 minutes ago

Tools for package owners.