Fix existing release / upgrade logging

When existing release found log that, and only log about upgrading
if actually doing that (due to changes found in the relase).

Change-Id: I54d224ce3abe4fabc74b3aaa32b1326eb1fd0d4f
This commit is contained in:
Sean Eagan 2018-10-17 10:37:05 -05:00
parent 6078774b34
commit bceb845d03
1 changed files with 9 additions and 9 deletions

View File

@ -101,7 +101,7 @@ class ChartDeploy(object):
if release_name in [rel[0] for rel in deployed_releases]:
# indicate to the end user what path we are taking
LOG.info("Upgrading release %s in namespace %s", release_name,
LOG.info("Existing release %s found in namespace %s", release_name,
namespace)
# extract the installed chart and installed values from the
# latest release so we can compare to the intended state
@ -113,7 +113,6 @@ class ChartDeploy(object):
force = upgrade.get('force', False)
recreate_pods = upgrade.get('recreate_pods', False)
LOG.info("Checking Pre/Post Actions")
if upgrade:
upgrade_pre = upgrade.get('pre', {})
upgrade_post = upgrade.get('post', {})
@ -148,8 +147,10 @@ class ChartDeploy(object):
# do actual update
timer = int(round(deadline - time.time()))
LOG.info('Beginning Upgrade, wait=%s, timeout=%ss',
native_wait_enabled, timer)
LOG.info(
"Upgrading release %s in namespace %s, wait=%s, "
"timeout=%ss", release_name, namespace, native_wait_enabled,
timer)
tiller_result = self.tiller.update_release(
new_chart,
release_name,
@ -169,12 +170,11 @@ class ChartDeploy(object):
# process install
else:
LOG.info("Installing release %s in namespace %s", release_name,
namespace)
timer = int(round(deadline - time.time()))
LOG.info('Beginning Install, wait=%s, timeout=%ss',
native_wait_enabled, timer)
LOG.info(
"Installing release %s in namespace %s, wait=%s, "
"timeout=%ss", release_name, namespace, native_wait_enabled,
timer)
tiller_result = self.tiller.install_release(
new_chart,
release_name,