split generic etcdoption out of main struct
This commit is contained in:
parent
be62cd2bf0
commit
82f9b6b0f5
|
@ -32,6 +32,7 @@ import (
|
|||
"k8s.io/kubernetes/pkg/registry/generic"
|
||||
"k8s.io/kubernetes/pkg/runtime/schema"
|
||||
"k8s.io/kubernetes/pkg/storage/storagebackend"
|
||||
utilerrors "k8s.io/kubernetes/pkg/util/errors"
|
||||
|
||||
// Install the testgroup API
|
||||
_ "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/install"
|
||||
|
@ -64,9 +65,11 @@ func Run(serverOptions *genericoptions.ServerRunOptions, stopCh <-chan struct{})
|
|||
// Set ServiceClusterIPRange
|
||||
_, serviceClusterIPRange, _ := net.ParseCIDR("10.0.0.0/24")
|
||||
serverOptions.ServiceClusterIPRange = *serviceClusterIPRange
|
||||
serverOptions.StorageConfig.ServerList = []string{"http://127.0.0.1:2379"}
|
||||
serverOptions.Etcd.StorageConfig.ServerList = []string{"http://127.0.0.1:2379"}
|
||||
genericvalidation.ValidateRunOptions(serverOptions)
|
||||
genericvalidation.VerifyEtcdServersList(serverOptions)
|
||||
if errs := serverOptions.Etcd.Validate(); len(errs) > 0 {
|
||||
return utilerrors.NewAggregate(errs)
|
||||
}
|
||||
config := genericapiserver.NewConfig().ApplyOptions(serverOptions).Complete()
|
||||
if err := config.MaybeGenerateServingCerts(); err != nil {
|
||||
// this wasn't treated as fatal for this process before
|
||||
|
|
Loading…
Reference in New Issue