@@ -32,6 +32,7 @@ import (
32
32
"github.com/openshift/origin/pkg/cmd/server/crypto"
33
33
cmdutil "github.com/openshift/origin/pkg/cmd/util"
34
34
oauthutil "github.com/openshift/origin/pkg/oauth/util"
35
+ overrideapi "github.com/openshift/origin/pkg/quota/admission/clusterresourceoverride/api"
35
36
"github.com/openshift/origin/pkg/util/httprequest"
36
37
oversion "github.com/openshift/origin/pkg/version"
37
38
)
@@ -43,7 +44,8 @@ const (
43
44
type AssetServerConfig struct {
44
45
GenericConfig * genericapiserver.Config
45
46
46
- Options oapi.AssetConfig
47
+ Options oapi.AssetConfig
48
+ LimitRequestOverrides * overrideapi.ClusterResourceOverrideConfig
47
49
48
50
PublicURL url.URL
49
51
}
@@ -59,7 +61,7 @@ type completedAssetServerConfig struct {
59
61
* AssetServerConfig
60
62
}
61
63
62
- func NewAssetServerConfig (assetConfig oapi.AssetConfig ) (* AssetServerConfig , error ) {
64
+ func NewAssetServerConfig (assetConfig oapi.AssetConfig , limitRequestOverrides * overrideapi. ClusterResourceOverrideConfig ) (* AssetServerConfig , error ) {
63
65
publicURL , err := url .Parse (assetConfig .PublicURL )
64
66
if err != nil {
65
67
glog .Fatal (err )
@@ -97,9 +99,10 @@ func NewAssetServerConfig(assetConfig oapi.AssetConfig) (*AssetServerConfig, err
97
99
genericConfig .SecureServingInfo .CipherSuites = crypto .CipherSuitesOrDie (assetConfig .ServingInfo .CipherSuites )
98
100
99
101
return & AssetServerConfig {
100
- GenericConfig : genericConfig ,
101
- Options : assetConfig ,
102
- PublicURL : * publicURL ,
102
+ GenericConfig : genericConfig ,
103
+ Options : assetConfig ,
104
+ LimitRequestOverrides : limitRequestOverrides ,
105
+ PublicURL : * publicURL ,
103
106
}, nil
104
107
}
105
108
@@ -216,19 +219,20 @@ func (c *completedAssetServerConfig) addWebConsoleConfig(serverMux *genericmux.P
216
219
217
220
// Generated web console config and server version
218
221
config := assets.WebConsoleConfig {
219
- APIGroupAddr : masterURL .Host ,
220
- APIGroupPrefix : server .APIGroupPrefix ,
221
- MasterAddr : masterURL .Host ,
222
- MasterPrefix : api .Prefix ,
223
- KubernetesAddr : masterURL .Host ,
224
- KubernetesPrefix : server .DefaultLegacyAPIPrefix ,
225
- OAuthAuthorizeURI : oauthutil .OpenShiftOAuthAuthorizeURL (masterURL .String ()),
226
- OAuthTokenURI : oauthutil .OpenShiftOAuthTokenURL (masterURL .String ()),
227
- OAuthRedirectBase : c .Options .PublicURL ,
228
- OAuthClientID : OpenShiftWebConsoleClientID ,
229
- LogoutURI : c .Options .LogoutURL ,
230
- LoggingURL : c .Options .LoggingPublicURL ,
231
- MetricsURL : c .Options .MetricsPublicURL ,
222
+ APIGroupAddr : masterURL .Host ,
223
+ APIGroupPrefix : server .APIGroupPrefix ,
224
+ MasterAddr : masterURL .Host ,
225
+ MasterPrefix : api .Prefix ,
226
+ KubernetesAddr : masterURL .Host ,
227
+ KubernetesPrefix : server .DefaultLegacyAPIPrefix ,
228
+ OAuthAuthorizeURI : oauthutil .OpenShiftOAuthAuthorizeURL (masterURL .String ()),
229
+ OAuthTokenURI : oauthutil .OpenShiftOAuthTokenURL (masterURL .String ()),
230
+ OAuthRedirectBase : c .Options .PublicURL ,
231
+ OAuthClientID : OpenShiftWebConsoleClientID ,
232
+ LogoutURI : c .Options .LogoutURL ,
233
+ LoggingURL : c .Options .LoggingPublicURL ,
234
+ MetricsURL : c .Options .MetricsPublicURL ,
235
+ LimitRequestOverrides : c .LimitRequestOverrides ,
232
236
}
233
237
kVersionInfo := kversion .Get ()
234
238
oVersionInfo := oversion .Get ()
0 commit comments