mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
The capability to control duration via controller-manager flags,
and the option to shut off reconciliation.
This commit is contained in:
@@ -58,10 +58,6 @@ const (
|
||||
// desiredStateOfWorldPopulatorLoopSleepPeriod is the amount of time the
|
||||
// DesiredStateOfWorldPopulator loop waits between successive executions
|
||||
desiredStateOfWorldPopulatorLoopSleepPeriod time.Duration = 1 * time.Minute
|
||||
|
||||
// reconcilerSyncDuration is the amount of time the reconciler sync states loop
|
||||
// wait between successive executions
|
||||
reconcilerSyncDuration time.Duration = 5 * time.Second
|
||||
)
|
||||
|
||||
// AttachDetachController defines the operations supported by this controller.
|
||||
@@ -78,7 +74,9 @@ func NewAttachDetachController(
|
||||
pvcInformer kcache.SharedInformer,
|
||||
pvInformer kcache.SharedInformer,
|
||||
cloud cloudprovider.Interface,
|
||||
plugins []volume.VolumePlugin) (AttachDetachController, error) {
|
||||
plugins []volume.VolumePlugin,
|
||||
disableReconciliation bool,
|
||||
reconcilerSyncDuration time.Duration) (AttachDetachController, error) {
|
||||
// TODO: The default resyncPeriod for shared informers is 12 hours, this is
|
||||
// unacceptable for the attach/detach controller. For example, if a pod is
|
||||
// skipped because the node it is scheduled to didn't set its annotation in
|
||||
@@ -131,10 +129,13 @@ func NewAttachDetachController(
|
||||
false)) // flag for experimental binary check for volume mount
|
||||
adc.nodeStatusUpdater = statusupdater.NewNodeStatusUpdater(
|
||||
kubeClient, nodeInformer, adc.actualStateOfWorld)
|
||||
|
||||
// Default these to values in options
|
||||
adc.reconciler = reconciler.NewReconciler(
|
||||
reconcilerLoopPeriod,
|
||||
reconcilerMaxWaitForUnmountDuration,
|
||||
reconcilerSyncDuration,
|
||||
disableReconciliation,
|
||||
adc.desiredStateOfWorld,
|
||||
adc.actualStateOfWorld,
|
||||
adc.attacherDetacher,
|
||||
|
||||
Reference in New Issue
Block a user