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
commit b3859edea1
1 changed files with 3 additions and 1 deletions

View File

@ -62,6 +62,7 @@ type ServerRunOptions struct {
SecureServing *genericoptions.SecureServingOptions
InsecureServing *genericoptions.ServingOptions
Authentication *kubeoptions.BuiltInAuthenticationOptions
CloudProvider *kubeoptions.CloudProviderOptions
}
func NewServerRunOptions() *ServerRunOptions {
@ -71,6 +72,7 @@ func NewServerRunOptions() *ServerRunOptions {
SecureServing: genericoptions.NewSecureServingOptions(),
InsecureServing: genericoptions.NewInsecureServingOptions(),
Authentication: kubeoptions.NewBuiltInAuthenticationOptions().WithAll(),
CloudProvider: kubeoptions.NewCloudProviderOptions(),
}
s.InsecureServing.BindPort = InsecurePort
s.SecureServing.ServingOptions.BindPort = SecurePort
@ -82,7 +84,7 @@ func (serverOptions *ServerRunOptions) Run(stopCh <-chan struct{}) error {
serverOptions.Etcd.StorageConfig.ServerList = []string{"http://127.0.0.1:2379"}
// set defaults
if err := serverOptions.GenericServerRunOptions.DefaultExternalHost(); err != nil {
if err := serverOptions.CloudProvider.DefaultExternalHost(serverOptions.GenericServerRunOptions); err != nil {
return err
}
if err := serverOptions.SecureServing.MaybeDefaultWithSelfSignedCerts(serverOptions.GenericServerRunOptions.AdvertiseAddress.String()); err != nil {