Skip to content

Commit

Permalink
fix(tiller): increase the max message size for grpc
Browse files Browse the repository at this point in the history
Increases the default message size from 4MB to 10MB.
  • Loading branch information
adamreese authored and technosophos committed Dec 5, 2016
1 parent 3cb2fd7 commit 98e0b97
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
3 changes: 1 addition & 2 deletions cmd/tiller/tiller.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
"os"

"github.com/spf13/cobra"
"google.golang.org/grpc"

"k8s.io/helm/pkg/proto/hapi/services"
"k8s.io/helm/pkg/storage"
Expand All @@ -41,7 +40,7 @@ const (
// rootServer is the root gRPC server.
//
// Each gRPC service registers itself to this server during init().
var rootServer = grpc.NewServer()
var rootServer = tiller.NewServer()

// env is the default environment.
//
Expand Down
12 changes: 12 additions & 0 deletions pkg/tiller/release_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"regexp"
"strings"

"google.golang.org/grpc"
"google.golang.org/grpc/metadata"

"github.com/technosophos/moniker"
Expand Down Expand Up @@ -81,6 +82,17 @@ var ListDefaultLimit int64 = 512
// prevents an empty string from matching.
var ValidName = regexp.MustCompile("^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])+$")

// maxMsgSize use 10MB as the default message size limit.
// grpc library default is 4MB
var maxMsgSize = 1024 * 1024 * 10

// NewServer creates a new grpc server.
func NewServer() *grpc.Server {
return grpc.NewServer(
grpc.MaxMsgSize(maxMsgSize),
)
}

// ReleaseServer implements the server-side gRPC endpoint for the HAPI services.
type ReleaseServer struct {
env *environment.Environment
Expand Down

0 comments on commit 98e0b97

Please sign in to comment.