Increase gRPC message size defaults
* Increase gRPC message size defaults The long term solution is better pagination when listing releases. This is a short-term fix that allows a larger message size as the 4MB built in gRPC default was being exhausted with just 10 releases. * Fix pep8 issues and define max value more clearly
This commit is contained in:
parent
f6971ac9ff
commit
152a387963
|
@ -27,6 +27,13 @@ TILLER_VERSION = b'2.1.3'
|
||||||
TILLER_TIMEOUT = 300
|
TILLER_TIMEOUT = 300
|
||||||
RELEASE_LIMIT = 64
|
RELEASE_LIMIT = 64
|
||||||
|
|
||||||
|
# the standard gRPC max message size is 4MB
|
||||||
|
# this expansion comes at a performance penalty
|
||||||
|
# but until proper paging is supported, we need
|
||||||
|
# to support a larger payload as the current
|
||||||
|
# limit is exhausted with just 10 releases
|
||||||
|
MAX_MESSAGE_LENGTH = 4010241024
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
class Tiller(object):
|
class Tiller(object):
|
||||||
|
@ -61,7 +68,13 @@ class Tiller(object):
|
||||||
'''
|
'''
|
||||||
tiller_ip = self._get_tiller_ip()
|
tiller_ip = self._get_tiller_ip()
|
||||||
tiller_port = self._get_tiller_port()
|
tiller_port = self._get_tiller_port()
|
||||||
return grpc.insecure_channel('%s:%s' % (tiller_ip, tiller_port))
|
return grpc.insecure_channel(
|
||||||
|
'%s:%s' % (tiller_ip, tiller_port),
|
||||||
|
options=[
|
||||||
|
('grpc.max_send_message_length', MAX_MESSAGE_LENGTH),
|
||||||
|
('grpc.max_receive_message_length', MAX_MESSAGE_LENGTH)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
def _get_tiller_pod(self):
|
def _get_tiller_pod(self):
|
||||||
'''
|
'''
|
||||||
|
|
Loading…
Reference in New Issue