Merge pull request #1085 from rphillips/fixes/http_client_timeout
add client request timeout
This commit is contained in:
commit
0aabf2d1ea
1 changed files with 4 additions and 1 deletions
|
@ -333,7 +333,10 @@ func newClient(cluster k8sapi.Cluster, user k8sapi.AuthInfo, namespace string, l
|
||||||
|
|
||||||
logger.Infof("kubernetes client apiVersion = %s", apiVersion)
|
logger.Infof("kubernetes client apiVersion = %s", apiVersion)
|
||||||
return &client{
|
return &client{
|
||||||
client: &http.Client{Transport: t},
|
client: &http.Client{
|
||||||
|
Transport: t,
|
||||||
|
Timeout: 15 * time.Second,
|
||||||
|
},
|
||||||
baseURL: cluster.Server,
|
baseURL: cluster.Server,
|
||||||
hash: func() hash.Hash { return fnv.New64() },
|
hash: func() hash.Hash { return fnv.New64() },
|
||||||
namespace: namespace,
|
namespace: namespace,
|
||||||
|
|
Reference in a new issue