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
991c862e
Commit
991c862e
authored
May 17, 2018
by
Antonio Murdaca
Committed by
Mikaël Cluseau
Jun 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pkg: kubelet: remote: increase grpc client default size
Signed-off-by:
Antonio Murdaca
<
runcom@redhat.com
>
parent
5ca598b4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
remote_image.go
pkg/kubelet/remote/remote_image.go
+1
-1
remote_runtime.go
pkg/kubelet/remote/remote_runtime.go
+1
-1
utils.go
pkg/kubelet/remote/utils.go
+4
-0
No files found.
pkg/kubelet/remote/remote_image.go
View file @
991c862e
...
@@ -43,7 +43,7 @@ func NewRemoteImageService(endpoint string, connectionTimeout time.Duration) (in
...
@@ -43,7 +43,7 @@ func NewRemoteImageService(endpoint string, connectionTimeout time.Duration) (in
return
nil
,
err
return
nil
,
err
}
}
conn
,
err
:=
grpc
.
Dial
(
addr
,
grpc
.
WithInsecure
(),
grpc
.
WithTimeout
(
connectionTimeout
),
grpc
.
WithDialer
(
dailer
))
conn
,
err
:=
grpc
.
Dial
(
addr
,
grpc
.
WithInsecure
(),
grpc
.
WithTimeout
(
connectionTimeout
),
grpc
.
WithDialer
(
dailer
)
,
grpc
.
WithDefaultCallOptions
(
grpc
.
MaxCallRecvMsgSize
(
maxMsgSize
))
)
if
err
!=
nil
{
if
err
!=
nil
{
glog
.
Errorf
(
"Connect remote image service %s failed: %v"
,
addr
,
err
)
glog
.
Errorf
(
"Connect remote image service %s failed: %v"
,
addr
,
err
)
return
nil
,
err
return
nil
,
err
...
...
pkg/kubelet/remote/remote_runtime.go
View file @
991c862e
...
@@ -45,7 +45,7 @@ func NewRemoteRuntimeService(endpoint string, connectionTimeout time.Duration) (
...
@@ -45,7 +45,7 @@ func NewRemoteRuntimeService(endpoint string, connectionTimeout time.Duration) (
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
conn
,
err
:=
grpc
.
Dial
(
addr
,
grpc
.
WithInsecure
(),
grpc
.
WithTimeout
(
connectionTimeout
),
grpc
.
WithDialer
(
dailer
))
conn
,
err
:=
grpc
.
Dial
(
addr
,
grpc
.
WithInsecure
(),
grpc
.
WithTimeout
(
connectionTimeout
),
grpc
.
WithDialer
(
dailer
)
,
grpc
.
WithDefaultCallOptions
(
grpc
.
MaxCallRecvMsgSize
(
maxMsgSize
))
)
if
err
!=
nil
{
if
err
!=
nil
{
glog
.
Errorf
(
"Connect remote runtime %s failed: %v"
,
addr
,
err
)
glog
.
Errorf
(
"Connect remote runtime %s failed: %v"
,
addr
,
err
)
return
nil
,
err
return
nil
,
err
...
...
pkg/kubelet/remote/utils.go
View file @
991c862e
...
@@ -25,6 +25,10 @@ import (
...
@@ -25,6 +25,10 @@ import (
runtimeapi
"k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
runtimeapi
"k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
)
)
// maxMsgSize use 8MB as the default message size limit.
// grpc library default is 4MB
const
maxMsgSize
=
1024
*
1024
*
8
// getContextWithTimeout returns a context with timeout.
// getContextWithTimeout returns a context with timeout.
func
getContextWithTimeout
(
timeout
time
.
Duration
)
(
context
.
Context
,
context
.
CancelFunc
)
{
func
getContextWithTimeout
(
timeout
time
.
Duration
)
(
context
.
Context
,
context
.
CancelFunc
)
{
return
context
.
WithTimeout
(
context
.
Background
(),
timeout
)
return
context
.
WithTimeout
(
context
.
Background
(),
timeout
)
...
...
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