[bug] pre-post-not-check-correctly
* updated pre and post checks
This commit is contained in:
parent
e046ee4c23
commit
bea6bd7212
|
@ -41,9 +41,9 @@ class ApplyChartsCommand(cmd.Command):
|
||||||
default=False, help='Skip Pre Flight')
|
default=False, help='Skip Pre Flight')
|
||||||
parser.add_argument('--debug', action='store',
|
parser.add_argument('--debug', action='store',
|
||||||
default=False, help='Run charts with dry run')
|
default=False, help='Run charts with dry run')
|
||||||
parser.add_argument('--disable-update-pre', action='store',
|
parser.add_argument('--disable-update-pre', action='store_true',
|
||||||
default=False, help='Disable pre upgrade actions')
|
default=False, help='Disable pre upgrade actions')
|
||||||
parser.add_argument('--disable-update-post', action='store',
|
parser.add_argument('--disable-update-post', action='store_true',
|
||||||
default=False, help='Disable post upgrade actions')
|
default=False, help='Disable post upgrade actions')
|
||||||
parser.add_argument('--enable-chart-cleanup', action='store',
|
parser.add_argument('--enable-chart-cleanup', action='store',
|
||||||
default=False, help='Enable Chart Clean Up')
|
default=False, help='Enable Chart Clean Up')
|
||||||
|
|
|
@ -131,13 +131,17 @@ class Armada(object):
|
||||||
installed_chart, installed_values = self.find_release_chart(
|
installed_chart, installed_values = self.find_release_chart(
|
||||||
known_releases, release_prefix(prefix, chart.release_name))
|
known_releases, release_prefix(prefix, chart.release_name))
|
||||||
|
|
||||||
if not self.disable_update_pre and getattr(chart, 'upgrade',
|
LOG.info("Checking Pre/Post Actions")
|
||||||
False):
|
upgrade = entry.get('chart', {}).get('upgrade', False)
|
||||||
pre_actions = getattr(chart.upgrade, 'pre', {})
|
if upgrade:
|
||||||
|
if not self.disable_update_pre and upgrade.get('pre',
|
||||||
|
False):
|
||||||
|
pre_actions = getattr(chart.upgrade, 'pre', {})
|
||||||
|
|
||||||
if not self.disable_update_post and getattr(chart, 'upgrade',
|
if not self.disable_update_post and upgrade.get('post',
|
||||||
False):
|
False):
|
||||||
post_actions = getattr(chart.upgrade, 'post', {})
|
LOG.info("Checking Post Actions")
|
||||||
|
post_actions = getattr(chart.upgrade, 'post', {})
|
||||||
|
|
||||||
# show delta for both the chart templates and the chart values
|
# show delta for both the chart templates and the chart values
|
||||||
# TODO(alanmeadows) account for .files differences
|
# TODO(alanmeadows) account for .files differences
|
||||||
|
|
Loading…
Reference in New Issue