PV controller: resync informers manually

We want relatively short resync period of PV/PVCs and at the same time we
don't want to force such short resync to all shared informer consumers.
Therefore we need to make our own periodic resync.
This commit is contained in:
Jan Safranek
2017-07-17 13:39:08 +02:00
parent 1170b7c2a1
commit 0eface85e4
3 changed files with 31 additions and 6 deletions

View File

@@ -164,6 +164,7 @@ type PersistentVolumeController struct {
volumePluginMgr vol.VolumePluginMgr
enableDynamicProvisioning bool
clusterName string
resyncPeriod time.Duration
// Cache of the last known version of volumes and claims. This cache is
// thread safe as long as the volumes/claims there are not modified, they