Merge pull request #39435 from sttts/sttts-cloudprovider-to-master

Automatic merge from submit-queue

Move apiserver cloudprovider dep into kubeapiserver
This commit is contained in:
Kubernetes Submit Queue
2017-01-05 02:29:11 -08:00
committed by GitHub
9 changed files with 103 additions and 55 deletions

View File

@@ -91,7 +91,7 @@ func Run(s *options.ServerRunOptions) error {
if err := s.SecureServing.MaybeDefaultWithSelfSignedCerts(s.GenericServerRunOptions.AdvertiseAddress.String(), apiServerServiceIP); err != nil {
return fmt.Errorf("error creating self-signed certificates: %v", err)
}
if err := s.GenericServerRunOptions.DefaultExternalHost(); err != nil {
if err := s.CloudProvider.DefaultExternalHost(s.GenericServerRunOptions); err != nil {
return fmt.Errorf("error setting the external host value: %v", err)
}
@@ -129,7 +129,7 @@ func Run(s *options.ServerRunOptions) error {
if len(s.SSHUser) > 0 {
// Get ssh key distribution func, if supported
var installSSH genericapiserver.InstallSSHKey
cloud, err := cloudprovider.InitCloudProvider(s.GenericServerRunOptions.CloudProvider, s.GenericServerRunOptions.CloudConfigFile)
cloud, err := cloudprovider.InitCloudProvider(s.CloudProvider.CloudProvider, s.CloudProvider.CloudConfigFile)
if err != nil {
return fmt.Errorf("cloud provider could not be initialized: %v", err)
}