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

@@ -24,6 +24,7 @@ import (
"github.com/xanzy/go-cloudstack/cloudstack"
"gopkg.in/gcfg.v1"
"k8s.io/kubernetes/pkg/cloudprovider"
"k8s.io/kubernetes/pkg/controller"
)
// ProviderName is the name of this cloud provider.
@@ -81,6 +82,9 @@ func newCSCloud(cfg *CSConfig) (*CSCloud, error) {
return &CSCloud{client, cfg.Global.ProjectID, cfg.Global.Zone}, nil
}
// Initialize passes a Kubernetes clientBuilder interface to the cloud provider
func (cs *CSCloud) Initialize(clientBuilder controller.ControllerClientBuilder) {}
// LoadBalancer returns an implementation of LoadBalancer for CloudStack.
func (cs *CSCloud) LoadBalancer() (cloudprovider.LoadBalancer, bool) {
return cs, true