extending DefaultExternalHost for any registred cloud provider see #46567
This commit is contained in:
@@ -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)
|
||||||
|
Reference in New Issue
Block a user