Skip to content

Commit

Permalink
OpenShift changes after the rebase to 1.7.6
Browse files Browse the repository at this point in the history
  • Loading branch information
soltysh committed Sep 30, 2017
1 parent 7ccd7dd commit 14b6612
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/assets/apiserver/asset_apiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func buildHandlerChainForAssets(consoleRedirectPath string) func(startingHandler
handler = genericapifilters.WithAudit(handler, c.RequestContextMapper, c.AuditBackend, c.AuditPolicyChecker, c.LongRunningFunc)
}
handler = genericfilters.WithCORS(handler, c.CorsAllowedOriginList, nil, nil, nil, "true")
handler = genericfilters.WithTimeoutForNonLongRunningRequests(handler, c.RequestContextMapper, c.LongRunningFunc)
handler = genericfilters.WithTimeoutForNonLongRunningRequests(handler, c.RequestContextMapper, c.LongRunningFunc, c.RequestTimeout)
handler = genericapifilters.WithRequestInfo(handler, genericapiserver.NewRequestInfoResolver(c), c.RequestContextMapper)
handler = apirequest.WithRequestContext(handler, c.RequestContextMapper)
handler = genericfilters.WithPanicRecovery(handler)
Expand Down
1 change: 1 addition & 0 deletions pkg/cmd/server/bootstrappolicy/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,7 @@ func GetOpenshiftBootstrapClusterRoles() []rbac.ClusterRole {

// TODO: restrict to pods scheduled on the bound node once supported
rbac.NewRule(read...).Groups(kapiGroup).Resources("pods").RuleOrDie(),
rbac.NewRule("create").Groups(kapiGroup).Resources("pods/eviction").RuleOrDie(),

// TODO: remove once mirror pods are removed
// TODO: restrict deletion to mirror pods created by the bound node once supported
Expand Down
1 change: 1 addition & 0 deletions pkg/cmd/server/kubernetes/master/master_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ func TestAPIServerDefaults(t *testing.T) {
MaxRequestsInFlight: 400,
MaxMutatingRequestsInFlight: 200,
MinRequestTimeout: 1800,
RequestTimeout: time.Duration(60) * time.Second,
},
Admission: &apiserveroptions.AdmissionOptions{
PluginNames: []string{"AlwaysAdmit"},
Expand Down
2 changes: 1 addition & 1 deletion pkg/oauth/apiserver/oauth_apiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func (c *OAuthServerConfig) buildHandlerChainForOAuth(startingHandler http.Handl

handler = genericfilters.WithMaxInFlightLimit(handler, genericConfig.MaxRequestsInFlight, genericConfig.MaxMutatingRequestsInFlight, genericConfig.RequestContextMapper, genericConfig.LongRunningFunc)
handler = genericfilters.WithCORS(handler, genericConfig.CorsAllowedOriginList, nil, nil, nil, "true")
handler = genericfilters.WithTimeoutForNonLongRunningRequests(handler, genericConfig.RequestContextMapper, genericConfig.LongRunningFunc)
handler = genericfilters.WithTimeoutForNonLongRunningRequests(handler, genericConfig.RequestContextMapper, genericConfig.LongRunningFunc, genericConfig.RequestTimeout)
handler = genericapifilters.WithRequestInfo(handler, genericapiserver.NewRequestInfoResolver(genericConfig), genericConfig.RequestContextMapper)
handler = apirequest.WithRequestContext(handler, genericConfig.RequestContextMapper)
handler = genericfilters.WithPanicRecovery(handler)
Expand Down
6 changes: 6 additions & 0 deletions test/testdata/bootstrappolicy/bootstrap_cluster_roles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2247,6 +2247,12 @@ items:
- get
- list
- watch
- apiGroups:
- ""
resources:
- pods/eviction
verbs:
- create
- apiGroups:
- ""
resources:
Expand Down
7 changes: 7 additions & 0 deletions test/testdata/bootstrappolicy/bootstrap_policy_file.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2457,6 +2457,13 @@ items:
- get
- list
- watch
- apiGroups:
- ""
attributeRestrictions: null
resources:
- pods/eviction
verbs:
- create
- apiGroups:
- ""
attributeRestrictions: null
Expand Down

0 comments on commit 14b6612

Please sign in to comment.