Works around low RELEASE_LIMIT by increasing it

We have been deploying in the low 60's of charts in many environments,
but the current treasuremap environment is running 68.

This led to a situation where tiller would find all 68 charts, but then
return only the newest 64 (RELEASE_LIMIT) in its response.  That meant
that armada did not see those charts when deciding whether to install or
upgrade.

Change-Id: I5d2a06f806006947ad48cc0e24b3f91baa3f37fd
This commit is contained in:
Mark Burnett 2018-04-17 14:39:05 -05:00
parent 8c03009061
commit df91412ed6
2 changed files with 6 additions and 1 deletions

View File

@ -301,6 +301,9 @@ class Armada(object):
deployed_releases = [x[0] for x in known_releases] deployed_releases = [x[0] for x in known_releases]
prefix_chart = release_prefix(prefix, release) prefix_chart = release_prefix(prefix, release)
# TODO(mark-burnett): It may be more robust to directly call
# tiller status to decide whether to install/upgrade rather
# than checking for list membership.
if prefix_chart in deployed_releases: if prefix_chart in deployed_releases:
# indicate to the end user what path we are taking # indicate to the end user what path we are taking

View File

@ -37,7 +37,7 @@ from armada.utils.release import label_selectors
TILLER_VERSION = b'2.7.2' TILLER_VERSION = b'2.7.2'
TILLER_TIMEOUT = 300 TILLER_TIMEOUT = 300
GRPC_EPSILON = 60 GRPC_EPSILON = 60
RELEASE_LIMIT = 64 RELEASE_LIMIT = 128 # TODO(mark-burnett): There may be a better page size.
RUNTEST_SUCCESS = 9 RUNTEST_SUCCESS = 9
# the standard gRPC max message size is 4MB # the standard gRPC max message size is 4MB
@ -166,6 +166,8 @@ class Tiller(object):
''' '''
releases = [] releases = []
stub = ReleaseServiceStub(self.channel) stub = ReleaseServiceStub(self.channel)
# TODO(mark-burnett): Since we're limiting page size, we need to
# iterate through all the pages when collecting this list.
req = ListReleasesRequest(limit=RELEASE_LIMIT, req = ListReleasesRequest(limit=RELEASE_LIMIT,
status_codes=[STATUS_DEPLOYED, status_codes=[STATUS_DEPLOYED,
STATUS_FAILED], STATUS_FAILED],