Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
07400f9d
Commit
07400f9d
authored
Apr 27, 2015
by
Wojciech Tyczynski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Increase maxIdleConnection limit in etcd client.
parent
99fc906f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
1 deletion
+43
-1
server.go
cmd/kube-apiserver/app/server.go
+11
-1
client.go
third_party/forked/coreos/go-etcd/etcd/client.go
+32
-0
No files found.
cmd/kube-apiserver/app/server.go
View file @
07400f9d
...
@@ -39,6 +39,7 @@ import (
...
@@ -39,6 +39,7 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/master"
"github.com/GoogleCloudPlatform/kubernetes/pkg/master"
"github.com/GoogleCloudPlatform/kubernetes/pkg/tools"
"github.com/GoogleCloudPlatform/kubernetes/pkg/tools"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
forked
"github.com/GoogleCloudPlatform/kubernetes/third_party/forked/coreos/go-etcd/etcd"
"github.com/coreos/go-etcd/etcd"
"github.com/coreos/go-etcd/etcd"
"github.com/golang/glog"
"github.com/golang/glog"
...
@@ -192,7 +193,16 @@ func newEtcd(etcdConfigFile string, etcdServerList util.StringList, storageVersi
...
@@ -192,7 +193,16 @@ func newEtcd(etcdConfigFile string, etcdServerList util.StringList, storageVersi
return
helper
,
err
return
helper
,
err
}
}
}
else
{
}
else
{
client
=
etcd
.
NewClient
(
etcdServerList
)
etcdClient
:=
etcd
.
NewClient
(
etcdServerList
)
transport
:=
&
http
.
Transport
{
Dial
:
forked
.
Dial
,
TLSClientConfig
:
&
tls
.
Config
{
InsecureSkipVerify
:
true
,
},
MaxIdleConnsPerHost
:
500
,
}
etcdClient
.
SetTransport
(
transport
)
client
=
etcdClient
}
}
return
master
.
NewEtcdHelper
(
client
,
storageVersion
,
pathPrefix
)
return
master
.
NewEtcdHelper
(
client
,
storageVersion
,
pathPrefix
)
...
...
third_party/forked/coreos/go-etcd/etcd/client.go
0 → 100644
View file @
07400f9d
package
etcd
import
(
"errors"
"net"
"time"
)
// dial attempts to open a TCP connection to the provided address, explicitly
// enabling keep-alives with a one-second interval.
func
Dial
(
network
,
addr
string
)
(
net
.
Conn
,
error
)
{
conn
,
err
:=
net
.
DialTimeout
(
network
,
addr
,
time
.
Second
)
if
err
!=
nil
{
return
nil
,
err
}
tcpConn
,
ok
:=
conn
.
(
*
net
.
TCPConn
)
if
!
ok
{
return
nil
,
errors
.
New
(
"Failed type-assertion of net.Conn as *net.TCPConn"
)
}
// Keep TCP alive to check whether or not the remote machine is down
if
err
=
tcpConn
.
SetKeepAlive
(
true
);
err
!=
nil
{
return
nil
,
err
}
if
err
=
tcpConn
.
SetKeepAlivePeriod
(
time
.
Second
);
err
!=
nil
{
return
nil
,
err
}
return
tcpConn
,
nil
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment