From d42f2df220daf8ff6169ca344afacb0b1ab18eb8 Mon Sep 17 00:00:00 2001 From: Robert Church Date: Mon, 29 Jul 2019 02:12:27 -0400 Subject: [PATCH] On all armada applies provide --enable-chart-cleanup When optional charts are enabled/disabled, manifest overrides are generated to include/exclude the chart from it's specific chart_group. By providing --enable-chart-cleanup to the armada apply, armada will purge chart releases that it's no longer managing. Prior to this, after disabling a chart and re-applying the application, the helm release would need to be manually removed. Change-Id: I34c9bcfd4eb4903e9dc74ec8228146b6cb96e74c Depends-On: Ic48a2e053d0de7dacfd6a07d817947e11dc8d596 Closes-Bug: #1833738 Signed-off-by: Robert Church --- sysinv/sysinv/sysinv/sysinv/conductor/kube_app.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sysinv/sysinv/sysinv/sysinv/conductor/kube_app.py b/sysinv/sysinv/sysinv/sysinv/conductor/kube_app.py index 076eeb0ef3..1562fb119f 100644 --- a/sysinv/sysinv/sysinv/sysinv/conductor/kube_app.py +++ b/sysinv/sysinv/sysinv/sysinv/conductor/kube_app.py @@ -2486,9 +2486,10 @@ class DockerHelper(object): LOG.error("Failed to validate application manifest " "%s: %s." % (manifest_file, exec_logs)) elif request == constants.APP_APPLY_OP: - cmd = "/bin/bash -c 'set -o pipefail; armada apply --debug " +\ - manifest_file + overrides_str + tiller_host + " | tee " +\ - logfile + "'" + cmd = ("/bin/bash -c 'set -o pipefail; armada apply " + "--enable-chart-cleanup --debug {m} {o} {t} | " + "tee {l}'".format(m=manifest_file, o=overrides_str, + t=tiller_host, l=logfile)) LOG.info("Armada apply command = %s" % cmd) (exit_code, exec_logs) = armada_svc.exec_run(cmd) if exit_code == 0: