From e2f688fa0d3cead645dc6737fa236021fa740f82 Mon Sep 17 00:00:00 2001
From: Matt Farina <matt@mattfarina.com>
Date: Wed, 7 Feb 2018 12:00:13 -0500
Subject: [PATCH] fix(grpc): Fixes issue where message sending limited to 4mb

Between grpc 1.2.x and 1.7.x there was an API change. The
previous MaxMsgSize is now a wrapper around MaxRecvMsgSize. This
change now sets the MaxRecvMsgSize and MaxSendMsgSize which need
to be set independently.

(cherry picked from commit 614cd9dfe7413a3b8624311bebaf8e8229b05e3f)
---
 pkg/tiller/server.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pkg/tiller/server.go b/pkg/tiller/server.go
index 57826578e..95276018e 100644
--- a/pkg/tiller/server.go
+++ b/pkg/tiller/server.go
@@ -36,7 +36,8 @@ var maxMsgSize = 1024 * 1024 * 20
 // DefaultServerOpts returns the set of default grpc ServerOption's that Tiller requires.
 func DefaultServerOpts() []grpc.ServerOption {
 	return []grpc.ServerOption{
-		grpc.MaxMsgSize(maxMsgSize),
+		grpc.MaxRecvMsgSize(maxMsgSize),
+		grpc.MaxSendMsgSize(maxMsgSize),
 		grpc.UnaryInterceptor(newUnaryInterceptor()),
 		grpc.StreamInterceptor(newStreamInterceptor()),
 	}
-- 
GitLab