Skip to content

Commit

Permalink
Bug 1433244 - allow imageimports to be long runing requests
Browse files Browse the repository at this point in the history
  • Loading branch information
soltysh committed Mar 20, 2017
1 parent 0f7e04d commit 7e52677
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pkg/client/imagestreams.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package client

import (
"errors"
"time"

kapi "k8s.io/kubernetes/pkg/api"
apierrs "k8s.io/kubernetes/pkg/api/errors"
Expand Down Expand Up @@ -109,7 +110,7 @@ func (c *imageStreams) UpdateStatus(stream *imageapi.ImageStream) (result *image
// will be returned if no actual import was requested (the to fields were not set), or an ImageStream if import was requested.
func (c *imageStreams) Import(isi *imageapi.ImageStreamImport) (*imageapi.ImageStreamImport, error) {
result := &imageapi.ImageStreamImport{}
if err := c.r.Post().Namespace(c.ns).Resource("imageStreamImports").Body(isi).Do().Into(result); err != nil {
if err := c.r.Post().Namespace(c.ns).Resource("imageStreamImports").Timeout(2 * time.Minute).Body(isi).Do().Into(result); err != nil {
return nil, transformUnsupported(err)
}
return result, nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/server/kubernetes/master_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ import (

// request paths that match this regular expression will be treated as long running
// and not subjected to the default server timeout.
const originLongRunningEndpointsRE = "(/|^)buildconfigs/.*/instantiatebinary$"
const originLongRunningEndpointsRE = "(/|^)(buildconfigs/.*/instantiatebinary|imagestreamimports)$"

var LegacyAPIGroupPrefixes = sets.NewString(genericapiserver.DefaultLegacyAPIPrefix, api.Prefix, api.LegacyPrefix)

Expand Down

0 comments on commit 7e52677

Please sign in to comment.