From 2a450414930c1293c5524e6b2f9854027c46bc4f Mon Sep 17 00:00:00 2001 From: "Dr. Stefan Schimanski" Date: Wed, 4 Jan 2017 18:57:06 +0100 Subject: [PATCH] Move apiserver cloudprovider dep into kubeapiserver --- apiserver/apiserver.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apiserver/apiserver.go b/apiserver/apiserver.go index 28aa112e..57cc5bb9 100644 --- a/apiserver/apiserver.go +++ b/apiserver/apiserver.go @@ -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 {