diff --git a/cmd/kube-apiserver/app/server.go b/cmd/kube-apiserver/app/server.go index ecb5e5a841e..2a7b0364d09 100644 --- a/cmd/kube-apiserver/app/server.go +++ b/cmd/kube-apiserver/app/server.go @@ -310,7 +310,7 @@ func Run(s *options.APIServer) error { genericConfig.EnableOpenAPISupport = true config := &master.Config{ - Config: genericConfig, + GenericConfig: genericConfig, StorageFactory: storageFactory, EnableWatchCache: s.EnableWatchCache, diff --git a/pkg/master/master.go b/pkg/master/master.go index 01e8aad0db6..7b5bfb6d0a1 100644 --- a/pkg/master/master.go +++ b/pkg/master/master.go @@ -116,7 +116,7 @@ const ( ) type Config struct { - *genericapiserver.Config + GenericConfig *genericapiserver.Config StorageFactory genericapiserver.StorageFactory EnableWatchCache bool @@ -231,7 +231,7 @@ func (c *Config) New() (*Master, error) { restOptionsFactory: restOptionsFactory{ deleteCollectionWorkers: c.DeleteCollectionWorkers, - enableGarbageCollection: c.EnableGarbageCollection, + enableGarbageCollection: c.GenericConfig.EnableGarbageCollection, storageFactory: c.StorageFactory, }, } @@ -247,8 +247,8 @@ func (c *Config) New() (*Master, error) { c.RESTStorageProviders = map[string]genericapiserver.RESTStorageProvider{} } c.RESTStorageProviders[appsapi.GroupName] = appsrest.RESTStorageProvider{} - c.RESTStorageProviders[authenticationv1beta1.GroupName] = authenticationrest.RESTStorageProvider{Authenticator: c.Authenticator} - c.RESTStorageProviders[authorization.GroupName] = authorizationrest.RESTStorageProvider{Authorizer: c.Authorizer} + c.RESTStorageProviders[authenticationv1beta1.GroupName] = authenticationrest.RESTStorageProvider{Authenticator: c.GenericConfig.Authenticator} + c.RESTStorageProviders[authorization.GroupName] = authorizationrest.RESTStorageProvider{Authorizer: c.GenericConfig.Authorizer} c.RESTStorageProviders[autoscaling.GroupName] = autoscalingrest.RESTStorageProvider{} c.RESTStorageProviders[batch.GroupName] = batchrest.RESTStorageProvider{} c.RESTStorageProviders[certificates.GroupName] = certificatesrest.RESTStorageProvider{} @@ -257,7 +257,7 @@ func (c *Config) New() (*Master, error) { DisableThirdPartyControllerForTesting: m.disableThirdPartyControllerForTesting, } c.RESTStorageProviders[policy.GroupName] = policyrest.RESTStorageProvider{} - c.RESTStorageProviders[rbac.GroupName] = &rbacrest.RESTStorageProvider{AuthorizerRBACSuperUser: c.AuthorizerRBACSuperUser} + c.RESTStorageProviders[rbac.GroupName] = &rbacrest.RESTStorageProvider{AuthorizerRBACSuperUser: c.GenericConfig.AuthorizerRBACSuperUser} c.RESTStorageProviders[storage.GroupName] = storagerest.RESTStorageProvider{} m.InstallAPIs(c) @@ -273,7 +273,7 @@ func (m *Master) InstallAPIs(c *Config) { apiGroupsInfo := []genericapiserver.APIGroupInfo{} // Install v1 unless disabled. - if c.APIResourceConfigSource.AnyResourcesForVersionEnabled(apiv1.SchemeGroupVersion) { + if c.GenericConfig.APIResourceConfigSource.AnyResourcesForVersionEnabled(apiv1.SchemeGroupVersion) { // Install v1 API. m.initV1ResourcesStorage(c) apiGroupInfo := genericapiserver.APIGroupInfo{ @@ -308,7 +308,7 @@ func (m *Master) InstallAPIs(c *Config) { } healthz.InstallHandler(m.Mux, healthzChecks...) - if c.EnableProfiling { + if c.GenericConfig.EnableProfiling { routes.MetricsWithReset{}.Install(m.Mux, m.HandlerContainer) } else { routes.DefaultMetrics{}.Install(m.Mux, m.HandlerContainer) @@ -316,7 +316,7 @@ func (m *Master) InstallAPIs(c *Config) { // Install third party resource support if requested // TODO seems like this bit ought to be unconditional and the REST API is controlled by the config - if c.APIResourceConfigSource.ResourceEnabled(extensionsapiv1beta1.SchemeGroupVersion.WithResource("thirdpartyresources")) { + if c.GenericConfig.APIResourceConfigSource.ResourceEnabled(extensionsapiv1beta1.SchemeGroupVersion.WithResource("thirdpartyresources")) { var err error m.thirdPartyStorageConfig, err = c.StorageFactory.NewConfig(extensions.Resource("thirdpartyresources")) if err != nil { @@ -332,12 +332,12 @@ func (m *Master) InstallAPIs(c *Config) { // stabilize order. // TODO find a better way to configure priority of groups for _, group := range sets.StringKeySet(c.RESTStorageProviders).List() { - if !c.APIResourceConfigSource.AnyResourcesForGroupEnabled(group) { + if !c.GenericConfig.APIResourceConfigSource.AnyResourcesForGroupEnabled(group) { glog.V(1).Infof("Skipping disabled API group %q.", group) continue } restStorageBuilder := c.RESTStorageProviders[group] - apiGroupInfo, enabled := restStorageBuilder.NewRESTStorage(c.APIResourceConfigSource, restOptionsGetter) + apiGroupInfo, enabled := restStorageBuilder.NewRESTStorage(c.GenericConfig.APIResourceConfigSource, restOptionsGetter) if !enabled { glog.Warningf("Problem initializing API group %q, skipping.", group) continue diff --git a/pkg/master/master_test.go b/pkg/master/master_test.go index bdca48e91c0..989e34bc95f 100644 --- a/pkg/master/master_test.go +++ b/pkg/master/master_test.go @@ -83,7 +83,7 @@ func setUp(t *testing.T) (*Master, *etcdtesting.EtcdTestServer, Config, *assert. GenericAPIServer: &genericapiserver.GenericAPIServer{}, } config := Config{ - Config: &genericapiserver.Config{}, + GenericConfig: &genericapiserver.Config{}, } resourceEncoding := genericapiserver.NewDefaultResourceEncodingConfig() @@ -97,17 +97,17 @@ func setUp(t *testing.T) (*Master, *etcdtesting.EtcdTestServer, Config, *assert. storageFactory := genericapiserver.NewDefaultStorageFactory(*storageConfig, testapi.StorageMediaType(), api.Codecs, resourceEncoding, DefaultAPIResourceConfigSource()) config.StorageFactory = storageFactory - config.APIResourceConfigSource = DefaultAPIResourceConfigSource() - config.PublicAddress = net.ParseIP("192.168.10.4") - config.Serializer = api.Codecs + config.GenericConfig.APIResourceConfigSource = DefaultAPIResourceConfigSource() + config.GenericConfig.PublicAddress = net.ParseIP("192.168.10.4") + config.GenericConfig.Serializer = api.Codecs config.KubeletClient = client.FakeKubeletClient{} - config.APIPrefix = "/api" - config.APIGroupPrefix = "/apis" - config.APIResourceConfigSource = DefaultAPIResourceConfigSource() - config.ProxyDialer = func(network, addr string) (net.Conn, error) { return nil, nil } - config.ProxyTLSClientConfig = &tls.Config{} - config.RequestContextMapper = api.NewRequestContextMapper() - config.Config.EnableVersion = true + config.GenericConfig.APIPrefix = "/api" + config.GenericConfig.APIGroupPrefix = "/apis" + config.GenericConfig.APIResourceConfigSource = DefaultAPIResourceConfigSource() + config.GenericConfig.ProxyDialer = func(network, addr string) (net.Conn, error) { return nil, nil } + config.GenericConfig.ProxyTLSClientConfig = &tls.Config{} + config.GenericConfig.RequestContextMapper = api.NewRequestContextMapper() + config.GenericConfig.EnableVersion = true // TODO: this is kind of hacky. The trouble is that the sync loop // runs in a go-routine and there is no way to validate in the test @@ -150,7 +150,7 @@ func limitedAPIResourceConfigSource() *genericapiserver.ResourceConfig { // newLimitedMaster only enables the core group, the extensions group, the batch group, and the autoscaling group. func newLimitedMaster(t *testing.T) (*Master, *etcdtesting.EtcdTestServer, Config, *assert.Assertions) { _, etcdserver, config, assert := setUp(t) - config.APIResourceConfigSource = limitedAPIResourceConfigSource() + config.GenericConfig.APIResourceConfigSource = limitedAPIResourceConfigSource() master, err := config.Complete().New() if err != nil { t.Fatalf("Error in bringing up the master: %v", err) @@ -168,8 +168,8 @@ func TestNew(t *testing.T) { // Verify many of the variables match their config counterparts assert.Equal(master.enableCoreControllers, config.EnableCoreControllers) assert.Equal(master.tunneler, config.Tunneler) - assert.Equal(master.RequestContextMapper(), config.RequestContextMapper) - assert.Equal(master.ClusterIP, config.PublicAddress) + assert.Equal(master.RequestContextMapper(), config.GenericConfig.RequestContextMapper) + assert.Equal(master.ClusterIP, config.GenericConfig.PublicAddress) // these values get defaulted _, serviceClusterIPRange, _ := net.ParseCIDR("10.0.0.0/24") @@ -181,10 +181,10 @@ func TestNew(t *testing.T) { // These functions should point to the same memory location masterDialer, _ := utilnet.Dialer(master.ProxyTransport) masterDialerFunc := fmt.Sprintf("%p", masterDialer) - configDialerFunc := fmt.Sprintf("%p", config.ProxyDialer) + configDialerFunc := fmt.Sprintf("%p", config.GenericConfig.ProxyDialer) assert.Equal(masterDialerFunc, configDialerFunc) - assert.Equal(master.ProxyTransport.(*http.Transport).TLSClientConfig, config.ProxyTLSClientConfig) + assert.Equal(master.ProxyTransport.(*http.Transport).TLSClientConfig, config.GenericConfig.ProxyTLSClientConfig) } // TestNamespaceSubresources ensures the namespace subresource parsing in apiserver/handlers.go doesn't drift @@ -1253,10 +1253,10 @@ func TestValidOpenAPISpec(t *testing.T) { _, etcdserver, config, assert := setUp(t) defer etcdserver.Terminate(t) - config.OpenAPIDefinitions = openapi.OpenAPIDefinitions - config.EnableOpenAPISupport = true - config.EnableIndex = true - config.OpenAPIInfo = spec.Info{ + config.GenericConfig.OpenAPIDefinitions = openapi.OpenAPIDefinitions + config.GenericConfig.EnableOpenAPISupport = true + config.GenericConfig.EnableIndex = true + config.GenericConfig.OpenAPIInfo = spec.Info{ InfoProps: spec.InfoProps{ Title: "Kubernetes", Version: "unversioned", diff --git a/test/integration/auth/accessreview_test.go b/test/integration/auth/accessreview_test.go index fb60949d99d..14aded61ca6 100644 --- a/test/integration/auth/accessreview_test.go +++ b/test/integration/auth/accessreview_test.go @@ -64,10 +64,10 @@ func TestSubjectAccessReview(t *testing.T) { defer s.Close() masterConfig := framework.NewIntegrationTestMasterConfig() - masterConfig.Authenticator = authenticator.RequestFunc(alwaysAlice) - masterConfig.Authorizer = sarAuthorizer{} - masterConfig.AdmissionControl = admit.NewAlwaysAdmit() - m, err := masterConfig.New() + masterConfig.GenericConfig.Authenticator = authenticator.RequestFunc(alwaysAlice) + masterConfig.GenericConfig.Authorizer = sarAuthorizer{} + masterConfig.GenericConfig.AdmissionControl = admit.NewAlwaysAdmit() + m, err := masterConfig.Complete().New() if err != nil { t.Fatalf("error in bringing up the master: %v", err) } @@ -164,12 +164,12 @@ func TestSelfSubjectAccessReview(t *testing.T) { username := "alice" masterConfig := framework.NewIntegrationTestMasterConfig() - masterConfig.Authenticator = authenticator.RequestFunc(func(req *http.Request) (user.Info, bool, error) { + masterConfig.GenericConfig.Authenticator = authenticator.RequestFunc(func(req *http.Request) (user.Info, bool, error) { return &user.DefaultInfo{Name: username}, true, nil }) - masterConfig.Authorizer = sarAuthorizer{} - masterConfig.AdmissionControl = admit.NewAlwaysAdmit() - m, err := masterConfig.New() + masterConfig.GenericConfig.Authorizer = sarAuthorizer{} + masterConfig.GenericConfig.AdmissionControl = admit.NewAlwaysAdmit() + m, err := masterConfig.Complete().New() if err != nil { t.Fatalf("error in bringing up the master: %v", err) } @@ -254,10 +254,10 @@ func TestLocalSubjectAccessReview(t *testing.T) { defer s.Close() masterConfig := framework.NewIntegrationTestMasterConfig() - masterConfig.Authenticator = authenticator.RequestFunc(alwaysAlice) - masterConfig.Authorizer = sarAuthorizer{} - masterConfig.AdmissionControl = admit.NewAlwaysAdmit() - m, err := masterConfig.New() + masterConfig.GenericConfig.Authenticator = authenticator.RequestFunc(alwaysAlice) + masterConfig.GenericConfig.Authorizer = sarAuthorizer{} + masterConfig.GenericConfig.AdmissionControl = admit.NewAlwaysAdmit() + m, err := masterConfig.Complete().New() if err != nil { t.Fatalf("error in bringing up the master: %v", err) } diff --git a/test/integration/auth/auth_test.go b/test/integration/auth/auth_test.go index 8cf6a9a9de9..23fbda1b15b 100644 --- a/test/integration/auth/auth_test.go +++ b/test/integration/auth/auth_test.go @@ -500,7 +500,7 @@ func getPreviousResourceVersionKey(url, id string) string { func TestAuthModeAlwaysDeny(t *testing.T) { // Set up a master masterConfig := framework.NewIntegrationTestMasterConfig() - masterConfig.Authorizer = apiserverauthorizer.NewAlwaysDenyAuthorizer() + masterConfig.GenericConfig.Authorizer = apiserverauthorizer.NewAlwaysDenyAuthorizer() _, s := framework.RunAMaster(masterConfig) defer s.Close() @@ -549,9 +549,9 @@ func TestAliceNotForbiddenOrUnauthorized(t *testing.T) { // Set up a master masterConfig := framework.NewIntegrationTestMasterConfig() - masterConfig.Authenticator = getTestTokenAuth() - masterConfig.Authorizer = allowAliceAuthorizer{} - masterConfig.AdmissionControl = admit.NewAlwaysAdmit() + masterConfig.GenericConfig.Authenticator = getTestTokenAuth() + masterConfig.GenericConfig.Authorizer = allowAliceAuthorizer{} + masterConfig.GenericConfig.AdmissionControl = admit.NewAlwaysAdmit() _, s := framework.RunAMaster(masterConfig) defer s.Close() @@ -619,8 +619,8 @@ func TestAliceNotForbiddenOrUnauthorized(t *testing.T) { func TestBobIsForbidden(t *testing.T) { // This file has alice and bob in it. masterConfig := framework.NewIntegrationTestMasterConfig() - masterConfig.Authenticator = getTestTokenAuth() - masterConfig.Authorizer = allowAliceAuthorizer{} + masterConfig.GenericConfig.Authenticator = getTestTokenAuth() + masterConfig.GenericConfig.Authorizer = allowAliceAuthorizer{} _, s := framework.RunAMaster(masterConfig) defer s.Close() @@ -663,8 +663,8 @@ func TestUnknownUserIsUnauthorized(t *testing.T) { // Set up a master masterConfig := framework.NewIntegrationTestMasterConfig() - masterConfig.Authenticator = getTestTokenAuth() - masterConfig.Authorizer = allowAliceAuthorizer{} + masterConfig.GenericConfig.Authenticator = getTestTokenAuth() + masterConfig.GenericConfig.Authorizer = allowAliceAuthorizer{} _, s := framework.RunAMaster(masterConfig) defer s.Close() @@ -725,8 +725,8 @@ func (impersonateAuthorizer) Authorize(a authorizer.Attributes) (bool, string, e func TestImpersonateIsForbidden(t *testing.T) { // Set up a master masterConfig := framework.NewIntegrationTestMasterConfig() - masterConfig.Authenticator = getTestTokenAuth() - masterConfig.Authorizer = impersonateAuthorizer{} + masterConfig.GenericConfig.Authenticator = getTestTokenAuth() + masterConfig.GenericConfig.Authorizer = impersonateAuthorizer{} _, s := framework.RunAMaster(masterConfig) defer s.Close() @@ -872,8 +872,8 @@ func TestAuthorizationAttributeDetermination(t *testing.T) { // Set up a master masterConfig := framework.NewIntegrationTestMasterConfig() - masterConfig.Authenticator = getTestTokenAuth() - masterConfig.Authorizer = trackingAuthorizer + masterConfig.GenericConfig.Authenticator = getTestTokenAuth() + masterConfig.GenericConfig.Authorizer = trackingAuthorizer _, s := framework.RunAMaster(masterConfig) defer s.Close() @@ -938,8 +938,8 @@ func TestNamespaceAuthorization(t *testing.T) { // Set up a master masterConfig := framework.NewIntegrationTestMasterConfig() - masterConfig.Authenticator = getTestTokenAuth() - masterConfig.Authorizer = a + masterConfig.GenericConfig.Authenticator = getTestTokenAuth() + masterConfig.GenericConfig.Authorizer = a _, s := framework.RunAMaster(masterConfig) defer s.Close() @@ -1036,8 +1036,8 @@ func TestKindAuthorization(t *testing.T) { // Set up a master masterConfig := framework.NewIntegrationTestMasterConfig() - masterConfig.Authenticator = getTestTokenAuth() - masterConfig.Authorizer = a + masterConfig.GenericConfig.Authenticator = getTestTokenAuth() + masterConfig.GenericConfig.Authorizer = a _, s := framework.RunAMaster(masterConfig) defer s.Close() @@ -1120,8 +1120,8 @@ func TestReadOnlyAuthorization(t *testing.T) { // Set up a master masterConfig := framework.NewIntegrationTestMasterConfig() - masterConfig.Authenticator = getTestTokenAuth() - masterConfig.Authorizer = a + masterConfig.GenericConfig.Authenticator = getTestTokenAuth() + masterConfig.GenericConfig.Authorizer = a _, s := framework.RunAMaster(masterConfig) defer s.Close() @@ -1179,8 +1179,8 @@ func TestWebhookTokenAuthenticator(t *testing.T) { // Set up a master masterConfig := framework.NewIntegrationTestMasterConfig() - masterConfig.Authenticator = authenticator - masterConfig.Authorizer = allowAliceAuthorizer{} + masterConfig.GenericConfig.Authenticator = authenticator + masterConfig.GenericConfig.Authorizer = allowAliceAuthorizer{} _, s := framework.RunAMaster(masterConfig) defer s.Close() diff --git a/test/integration/auth/rbac_test.go b/test/integration/auth/rbac_test.go index 6c12d28d2c6..1c95bfb3e17 100644 --- a/test/integration/auth/rbac_test.go +++ b/test/integration/auth/rbac_test.go @@ -338,9 +338,9 @@ func TestRBAC(t *testing.T) { for i, tc := range tests { // Create an API Server. masterConfig := framework.NewIntegrationTestMasterConfig() - masterConfig.Authorizer = newRBACAuthorizer(t, superUser, masterConfig) - masterConfig.Authenticator = newFakeAuthenticator() - masterConfig.AuthorizerRBACSuperUser = superUser + masterConfig.GenericConfig.Authorizer = newRBACAuthorizer(t, superUser, masterConfig) + masterConfig.GenericConfig.Authenticator = newFakeAuthenticator() + masterConfig.GenericConfig.AuthorizerRBACSuperUser = superUser _, s := framework.RunAMaster(masterConfig) defer s.Close() @@ -437,9 +437,9 @@ func TestBootstrapping(t *testing.T) { superUser := "admin" masterConfig := framework.NewIntegrationTestMasterConfig() - masterConfig.Authorizer = newRBACAuthorizer(t, superUser, masterConfig) - masterConfig.Authenticator = newFakeAuthenticator() - masterConfig.AuthorizerRBACSuperUser = superUser + masterConfig.GenericConfig.Authorizer = newRBACAuthorizer(t, superUser, masterConfig) + masterConfig.GenericConfig.Authenticator = newFakeAuthenticator() + masterConfig.GenericConfig.AuthorizerRBACSuperUser = superUser _, s := framework.RunAMaster(masterConfig) defer s.Close() diff --git a/test/integration/framework/master_utils.go b/test/integration/framework/master_utils.go index 2bc98eaa370..ca7fea5f944 100644 --- a/test/integration/framework/master_utils.go +++ b/test/integration/framework/master_utils.go @@ -134,16 +134,16 @@ func startMasterOrDie(masterConfig *master.Config) (*master.Master, *httptest.Se if masterConfig == nil { masterConfig = NewMasterConfig() - masterConfig.EnableProfiling = true - masterConfig.EnableSwaggerSupport = true - masterConfig.EnableOpenAPISupport = true - masterConfig.OpenAPIInfo = spec.Info{ + masterConfig.GenericConfig.EnableProfiling = true + masterConfig.GenericConfig.EnableSwaggerSupport = true + masterConfig.GenericConfig.EnableOpenAPISupport = true + masterConfig.GenericConfig.OpenAPIInfo = spec.Info{ InfoProps: spec.InfoProps{ Title: "Kubernetes", Version: "unversioned", }, } - masterConfig.OpenAPIDefaultResponse = spec.Response{ + masterConfig.GenericConfig.OpenAPIDefaultResponse = spec.Response{ ResponseProps: spec.ResponseProps{ Description: "Default Response.", }, @@ -221,7 +221,7 @@ func NewMasterConfig() *master.Config { NewSingleContentTypeSerializer(api.Scheme, testapi.Storage.Codec(), runtime.ContentTypeJSON)) return &master.Config{ - Config: &genericapiserver.Config{ + GenericConfig: &genericapiserver.Config{ APIResourceConfigSource: master.DefaultAPIResourceConfigSource(), APIPrefix: "/api", APIGroupPrefix: "/apis", @@ -245,10 +245,10 @@ func NewMasterConfig() *master.Config { func NewIntegrationTestMasterConfig() *master.Config { masterConfig := NewMasterConfig() masterConfig.EnableCoreControllers = true - masterConfig.EnableIndex = true - masterConfig.EnableVersion = true - masterConfig.PublicAddress = net.ParseIP("192.168.10.4") - masterConfig.APIResourceConfigSource = master.DefaultAPIResourceConfigSource() + masterConfig.GenericConfig.EnableIndex = true + masterConfig.GenericConfig.EnableVersion = true + masterConfig.GenericConfig.PublicAddress = net.ParseIP("192.168.10.4") + masterConfig.GenericConfig.APIResourceConfigSource = master.DefaultAPIResourceConfigSource() return masterConfig } @@ -332,7 +332,7 @@ func ScaleRC(name, ns string, replicas int32, clientset clientset.Interface) (*a func RunAMaster(masterConfig *master.Config) (*master.Master, *httptest.Server) { if masterConfig == nil { masterConfig = NewMasterConfig() - masterConfig.EnableProfiling = true + masterConfig.GenericConfig.EnableProfiling = true } return startMasterOrDie(masterConfig) } diff --git a/test/integration/garbagecollector/garbage_collector_test.go b/test/integration/garbagecollector/garbage_collector_test.go index 7830d17cafe..bc95697208d 100644 --- a/test/integration/garbagecollector/garbage_collector_test.go +++ b/test/integration/garbagecollector/garbage_collector_test.go @@ -121,7 +121,7 @@ func newOwnerRC(name, namespace string) *v1.ReplicationController { func setup(t *testing.T) (*httptest.Server, *garbagecollector.GarbageCollector, clientset.Interface) { masterConfig := framework.NewIntegrationTestMasterConfig() masterConfig.EnableCoreControllers = false - masterConfig.EnableGarbageCollection = true + masterConfig.GenericConfig.EnableGarbageCollection = true _, s := framework.RunAMaster(masterConfig) clientSet, err := clientset.NewForConfig(&restclient.Config{Host: s.URL}) diff --git a/test/integration/master/master_test.go b/test/integration/master/master_test.go index 23bbadb3193..1674e632175 100644 --- a/test/integration/master/master_test.go +++ b/test/integration/master/master_test.go @@ -424,7 +424,7 @@ func TestServiceAlloc(t *testing.T) { if err != nil { t.Fatalf("bad cidr: %v", err) } - cfg.ServiceClusterIPRange = cidr + cfg.GenericConfig.ServiceClusterIPRange = cidr _, s := framework.RunAMaster(cfg) defer s.Close() diff --git a/test/integration/openshift/openshift_test.go b/test/integration/openshift/openshift_test.go index e70a62fbbb7..e6452da4aed 100644 --- a/test/integration/openshift/openshift_test.go +++ b/test/integration/openshift/openshift_test.go @@ -27,7 +27,7 @@ import ( // are not referenced directly by a master. func TestMasterExportsSymbols(t *testing.T) { _ = &master.Config{ - Config: &genericapiserver.Config{ + GenericConfig: &genericapiserver.Config{ EnableSwaggerSupport: false, RestfulContainer: nil, }, diff --git a/test/integration/quota/quota_test.go b/test/integration/quota/quota_test.go index 82ead85da02..c999ddd4932 100644 --- a/test/integration/quota/quota_test.go +++ b/test/integration/quota/quota_test.go @@ -72,7 +72,7 @@ func TestQuota(t *testing.T) { defer close(admissionCh) masterConfig := framework.NewIntegrationTestMasterConfig() - masterConfig.AdmissionControl = admission + masterConfig.GenericConfig.AdmissionControl = admission m, err = masterConfig.Complete().New() if err != nil { t.Fatalf("Error in bringing up the master: %v", err) diff --git a/test/integration/serviceaccount/service_account_test.go b/test/integration/serviceaccount/service_account_test.go index ed994b0a9e7..7ff934af802 100644 --- a/test/integration/serviceaccount/service_account_test.go +++ b/test/integration/serviceaccount/service_account_test.go @@ -406,10 +406,10 @@ func startServiceAccountTestServer(t *testing.T) (*clientset.Clientset, restclie serviceAccountAdmission := serviceaccountadmission.NewServiceAccount(rootClientset) masterConfig := framework.NewMasterConfig() - masterConfig.EnableIndex = true - masterConfig.Authenticator = authenticator - masterConfig.Authorizer = authorizer - masterConfig.AdmissionControl = serviceAccountAdmission + masterConfig.GenericConfig.EnableIndex = true + masterConfig.GenericConfig.Authenticator = authenticator + masterConfig.GenericConfig.Authorizer = authorizer + masterConfig.GenericConfig.AdmissionControl = serviceAccountAdmission // Create a master and install handlers into mux. m, err := masterConfig.Complete().New()