@@ -17,6 +17,7 @@ import (
17
17
kcorestorage "k8s.io/kubernetes/pkg/registry/core/rest"
18
18
rbacrest "k8s.io/kubernetes/pkg/registry/rbac/rest"
19
19
20
+ "github.com/openshift/origin/pkg/cmd/openshift-apiserver/openshiftapiserver"
20
21
"github.com/openshift/origin/pkg/cmd/server/bootstrappolicy"
21
22
kubernetes "github.com/openshift/origin/pkg/cmd/server/kubernetes/master"
22
23
cmdutil "github.com/openshift/origin/pkg/cmd/util"
@@ -35,7 +36,7 @@ const (
35
36
openShiftOAuthCallbackPrefix = "/oauth2callback"
36
37
)
37
38
38
- func (c * MasterConfig ) newOpenshiftAPIConfig (kubeAPIServerConfig apiserver.Config ) (* OpenshiftAPIConfig , error ) {
39
+ func (c * MasterConfig ) newOpenshiftAPIConfig (kubeAPIServerConfig apiserver.Config ) (* openshiftapiserver. OpenshiftAPIConfig , error ) {
39
40
// sccStorage must use the upstream RESTOptionsGetter to be in the correct location
40
41
// this probably creates a duplicate cache, but there are not very many SCCs, so live with it to avoid further linkage
41
42
sccStorage := sccstorage .NewREST (kubeAPIServerConfig .RESTOptionsGetter )
@@ -56,9 +57,9 @@ func (c *MasterConfig) newOpenshiftAPIConfig(kubeAPIServerConfig apiserver.Confi
56
57
}
57
58
}
58
59
59
- ret := & OpenshiftAPIConfig {
60
+ ret := & openshiftapiserver. OpenshiftAPIConfig {
60
61
GenericConfig : & apiserver.RecommendedConfig {Config : genericConfig },
61
- ExtraConfig : OpenshiftAPIExtraConfig {
62
+ ExtraConfig : openshiftapiserver. OpenshiftAPIExtraConfig {
62
63
KubeAPIServerClientConfig : & c .PrivilegedLoopbackClientConfig ,
63
64
KubeInternalInformers : c .InternalKubeInformers ,
64
65
KubeInformers : c .ClientGoKubeInformers ,
@@ -160,7 +161,7 @@ func (c *MasterConfig) withKubeAPI(delegateAPIServer apiserver.DelegationTarget,
160
161
161
162
// this remains here and separate so that you can check both kube and openshift levels
162
163
// TODO make this is a proxy at some point
163
- addOpenshiftVersionRoute (kubeAPIServer .GenericAPIServer .Handler .GoRestfulContainer , "/version/openshift" )
164
+ openshiftapiserver . AddOpenshiftVersionRoute (kubeAPIServer .GenericAPIServer .Handler .GoRestfulContainer , "/version/openshift" )
164
165
165
166
return preparedKubeAPIServer .GenericAPIServer , nil
166
167
}
@@ -278,7 +279,7 @@ func (c *MasterConfig) Run(stopCh <-chan struct{}) error {
278
279
279
280
// add post-start hooks
280
281
aggregatedAPIServer .GenericAPIServer .AddPostStartHookOrDie ("authorization.openshift.io-bootstrapclusterroles" , bootstrapData (bootstrappolicy .Policy ()).EnsureRBACPolicy ())
281
- aggregatedAPIServer .GenericAPIServer .AddPostStartHookOrDie ("authorization.openshift.io-ensureopenshift-infra" , ensureOpenShiftInfraNamespace )
282
+ aggregatedAPIServer .GenericAPIServer .AddPostStartHookOrDie ("authorization.openshift.io-ensureopenshift-infra" , openshiftapiserver . EnsureOpenShiftInfraNamespace )
282
283
c .AddPostStartHooks (aggregatedAPIServer .GenericAPIServer )
283
284
284
285
for name , fn := range c .additionalPostStartHooks {
@@ -337,7 +338,7 @@ func (c *MasterConfig) RunKubeAPIServer(stopCh <-chan struct{}) error {
337
338
}
338
339
339
340
aggregatedAPIServer .GenericAPIServer .AddPostStartHookOrDie ("authorization.openshift.io-bootstrapclusterroles" , bootstrapData (bootstrappolicy .Policy ()).EnsureRBACPolicy ())
340
- aggregatedAPIServer .GenericAPIServer .AddPostStartHookOrDie ("authorization.openshift.io-ensureopenshift-infra" , ensureOpenShiftInfraNamespace )
341
+ aggregatedAPIServer .GenericAPIServer .AddPostStartHookOrDie ("authorization.openshift.io-ensureopenshift-infra" , openshiftapiserver . EnsureOpenShiftInfraNamespace )
341
342
c .AddPostStartHooks (aggregatedAPIServer .GenericAPIServer )
342
343
343
344
// add post-start hooks
0 commit comments