Set the informer on the user cloud object

pull/564/head
hello2mao 2019-01-18 22:29:26 +08:00
parent 44419ce38e
commit 5024611b87
1 changed files with 4 additions and 0 deletions

View File

@ -213,6 +213,10 @@ func startControllers(c *cloudcontrollerconfig.CompletedConfig, stopCh <-chan st
if cloud != nil {
// Initialize the cloud provider with a reference to the clientBuilder
cloud.Initialize(c.ClientBuilder, stopCh)
// Set the informer on the user cloud object
if informerUserCloud, ok := cloud.(cloudprovider.InformerUser); ok {
informerUserCloud.SetInformers(c.SharedInformers)
}
}
for controllerName, initFn := range controllers {