Initialize cloud providers with a K8s clientBuilder

This commit is contained in:
Nick Sardo
2017-05-17 14:38:25 -07:00
parent d823a6e228
commit 87a5edd2cd
26 changed files with 72 additions and 2 deletions

View File

@@ -451,6 +451,11 @@ func StartControllers(controllers map[string]InitFunc, s *options.CMServer, root
return fmt.Errorf("cloud provider could not be initialized: %v", err)
}
if cloud != nil {
// Initialize the cloud provider with a reference to the clientBuilder
cloud.Initialize(clientBuilder)
}
if ctx.IsControllerEnabled(nodeControllerName) {
_, clusterCIDR, err := net.ParseCIDR(s.ClusterCIDR)
if err != nil {