type 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 // // 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 // // hostutil - hostutil passed in from kubelet // // volumePluginMgr - volume plugin manager passed from kubelet func NewReconciler( kubeClient clientset.Interface, controllerAttachDetachEnabled bool, loopSleepDuration time.Duration, waitForAttachTimeout time.Duration, nodeName types.NodeName, desiredStateOfWorld cache.DesiredStateOfWorld, actualStateOfWorld cache.ActualStateOfWorld, populatorHasAddedPods func() bool, operationExecutor operationexecutor.OperationExecutor, mounter mount.Interface, hostutil hostutil.HostUtils, volumePluginMgr *volumepkg.VolumePluginMgr, kubeletPodsDir string) Reconciler { … } type reconciler … func (rc *reconciler) unmountVolumes() { … } func (rc *reconciler) mountOrAttachVolumes() { … } func (rc *reconciler) expandVolume(volumeToMount cache.VolumeToMount, currentSize resource.Quantity) { … } func (rc *reconciler) mountAttachedVolumes(volumeToMount cache.VolumeToMount, podExistError error) { … } func (rc *reconciler) waitForVolumeAttach(volumeToMount cache.VolumeToMount) { … } func (rc *reconciler) unmountDetachDevices() { … } // ignore nestedpendingoperations.IsAlreadyExists and exponentialbackoff.IsExponentialBackoff errors, they are expected. func isExpectedError(err error) bool { … }