Documentation ¶
Overview ¶
Package reconciler implements interfaces that attempt to reconcile the desired state of the world with the actual state of the world by triggering relevant actions (attach, detach, mount, unmount).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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(stopCh <-chan struct{}) // StatesHasBeenSynced returns true only after syncStates process starts to sync // states at least once after kubelet starts StatesHasBeenSynced() bool }
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 clientset.Interface, controllerAttachDetachEnabled bool, loopSleepDuration time.Duration, syncDuration time.Duration, waitForAttachTimeout time.Duration, nodeName types.NodeName, desiredStateOfWorld cache.DesiredStateOfWorld, actualStateOfWorld cache.ActualStateOfWorld, populatorHasAddedPods func() bool, operationExecutor operationexecutor.OperationExecutor, mounter mount.Interface, volumePluginMgr *volumepkg.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 syncDuration - the amount of time the syncStates sleeps between successive executions
waitForAttachTimeout - the amount of time the Mount function will wait for
the volume to be attached
nodeName - the Name 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 populatorHasAddedPods - checker for whether the populator has finished
adding pods to the desiredStateOfWorld cache at least once after sources are all ready (before sources are ready, pods are probably missing)
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