package attachdetach
import "k8s.io/kubernetes/pkg/controller/volume/attachdetach"
Package attachdetach implements a controller to manage volume attach and detach operations.
Index ¶
Types ¶
type AttachDetachController ¶
type AttachDetachController interface {
Run(stopCh <-chan struct{})
GetDesiredStateOfWorld() cache.DesiredStateOfWorld
}
AttachDetachController defines the operations supported by this controller.
func NewAttachDetachController ¶
func NewAttachDetachController( kubeClient clientset.Interface, csiClient csiclient.Interface, podInformer coreinformers.PodInformer, nodeInformer coreinformers.NodeInformer, pvcInformer coreinformers.PersistentVolumeClaimInformer, pvInformer coreinformers.PersistentVolumeInformer, cloud cloudprovider.Interface, plugins []volume.VolumePlugin, prober volume.DynamicPluginProber, disableReconciliationSync bool, reconcilerSyncDuration time.Duration, timerConfig TimerConfig) (AttachDetachController, error)
NewAttachDetachController returns a new instance of AttachDetachController.
type TimerConfig ¶
type TimerConfig struct {
// ReconcilerLoopPeriod is the amount of time the reconciler loop waits
// between successive executions
ReconcilerLoopPeriod time.Duration
// ReconcilerMaxWaitForUnmountDuration is the maximum amount of time the
// attach detach controller will wait for a volume to be safely unmounted
// from its node. Once this time has expired, the controller will assume the
// node or kubelet are unresponsive and will detach the volume anyway.
ReconcilerMaxWaitForUnmountDuration time.Duration
// DesiredStateOfWorldPopulatorLoopSleepPeriod is the amount of time the
// DesiredStateOfWorldPopulator loop waits between successive executions
DesiredStateOfWorldPopulatorLoopSleepPeriod time.Duration
// DesiredStateOfWorldPopulatorListPodsRetryDuration is the amount of
// time the DesiredStateOfWorldPopulator loop waits between list pods
// calls.
DesiredStateOfWorldPopulatorListPodsRetryDuration time.Duration
}
TimerConfig contains configuration of internal attach/detach timers and should be used only to speed up tests. DefaultTimerConfig is the suggested timer configuration for production.
var DefaultTimerConfig TimerConfig = TimerConfig{ ReconcilerLoopPeriod: 100 * time.Millisecond, ReconcilerMaxWaitForUnmountDuration: 6 * time.Minute, DesiredStateOfWorldPopulatorLoopSleepPeriod: 1 * time.Minute, DesiredStateOfWorldPopulatorListPodsRetryDuration: 3 * time.Minute, }
DefaultTimerConfig is the default configuration of Attach/Detach controller timers.
Source Files ¶
attach_detach_controller.go
Directories ¶
| Path | Synopsis |
|---|---|
| pkg/controller/volume/attachdetach/cache | Package cache implements data structures used by the attach/detach controller to keep track of volumes, the nodes they are attached to, and the pods that reference them. |
| pkg/controller/volume/attachdetach/metrics | |
| pkg/controller/volume/attachdetach/populator | Package populator implements interfaces that monitor and keep the states of the desired_state_of_word in sync with the "ground truth" from informer. |
| pkg/controller/volume/attachdetach/reconciler | Package reconciler implements interfaces that attempt to reconcile the desired state of the with the actual state of the world by triggering actions. |
| pkg/controller/volume/attachdetach/statusupdater | Package statusupdater implements interfaces that enable updating the status of API objects. |
| pkg/controller/volume/attachdetach/testing | |
| pkg/controller/volume/attachdetach/util |
- Version
- v1.13.2-beta.0
- Published
- Dec 13, 2018
- Platform
- windows/amd64
- Imports
- 33 packages
- Last checked
- 18 minutes ago –
Tools for package owners.