extending DefaultExternalHost for any registred cloud provider see #46567

This commit is contained in:
Yassine TIJANI 2017-06-06 13:40:21 +02:00
parent c0407972e9
commit 2eec2beed8

View File

@ -54,8 +54,7 @@ func (s *CloudProviderOptions) DefaultExternalHost(genericoptions *genericoption
return nil return nil
} }
// TODO: extend for other providers if cloudprovider.IsCloudProvider(s.CloudProvider) {
if s.CloudProvider == "gce" || s.CloudProvider == "aws" {
cloud, err := cloudprovider.InitCloudProvider(s.CloudProvider, s.CloudConfigFile) cloud, err := cloudprovider.InitCloudProvider(s.CloudProvider, s.CloudConfigFile)
if err != nil { if err != nil {
return fmt.Errorf("%q cloud provider could not be initialized: %v", s.CloudProvider, err) return fmt.Errorf("%q cloud provider could not be initialized: %v", s.CloudProvider, err)