Make master+federation ServerRunOptions embeddings explicit

This commit is contained in:
Dr. Stefan Schimanski
2016-10-25 09:28:11 +02:00
parent b798527793
commit ab3ce27f01
8 changed files with 103 additions and 103 deletions

View File

@@ -41,12 +41,12 @@ func NewAPIServer() *APIServer {
// Start starts the apiserver, returns when apiserver is ready.
func (a *APIServer) Start() error {
config := options.NewServerRunOptions()
config.StorageConfig.ServerList = []string{getEtcdClientURL()}
config.GenericServerRunOptions.StorageConfig.ServerList = []string{getEtcdClientURL()}
_, ipnet, err := net.ParseCIDR(clusterIPRange)
if err != nil {
return err
}
config.ServiceClusterIPRange = *ipnet
config.GenericServerRunOptions.ServiceClusterIPRange = *ipnet
config.AllowPrivileged = true
errCh := make(chan error)
go func() {

View File

@@ -37,7 +37,7 @@ import (
)
func TestLongRunningRequestRegexp(t *testing.T) {
regexp := regexp.MustCompile(options.NewServerRunOptions().LongRunningRequestRE)
regexp := regexp.MustCompile(options.NewServerRunOptions().GenericServerRunOptions.LongRunningRequestRE)
dontMatch := []string{
"/api/v1/watch-namespace/",
"/api/v1/namespace-proxy/",
@@ -86,10 +86,10 @@ var groupVersions = []unversioned.GroupVersion{
func TestRun(t *testing.T) {
s := options.NewServerRunOptions()
s.InsecurePort = insecurePort
s.GenericServerRunOptions.InsecurePort = insecurePort
_, ipNet, _ := net.ParseCIDR("10.10.10.0/24")
s.ServiceClusterIPRange = *ipNet
s.StorageConfig.ServerList = []string{"http://localhost:2379"}
s.GenericServerRunOptions.ServiceClusterIPRange = *ipNet
s.GenericServerRunOptions.StorageConfig.ServerList = []string{"http://localhost:2379"}
go func() {
if err := app.Run(s); err != nil {
t.Fatalf("Error in bringing up the server: %v", err)