reconciler

package
v1.4.6-beta.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2016 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

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

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(sourcesReady config.SourcesReady, 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 internalclientset.Interface,
	controllerAttachDetachEnabled bool,
	loopSleepDuration time.Duration,
	syncDuration time.Duration,
	waitForAttachTimeout time.Duration,
	hostName string,
	desiredStateOfWorld cache.DesiredStateOfWorld,
	actualStateOfWorld cache.ActualStateOfWorld,
	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

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

Jump to

Keyboard shortcuts

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