Move apiserver cloudprovider dep into kubeapiserver

This commit is contained in:
Dr. Stefan Schimanski
2017-01-04 18:57:06 +01:00
parent 5e9f39b5fb
commit f96fa748d8
9 changed files with 103 additions and 55 deletions

View File

@@ -90,7 +90,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)
}
@@ -128,7 +128,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)
}