Fix chart cleanup bug

-chart cleanup was never refactored for new yaml format
-fix chart cleanup syntax
-add simple.yaml for quick tests
-fix chart cleanup cli flag
This commit is contained in:
Tim Heyer
2017-07-12 16:29:28 +00:00
committed by Alexis Rivera DeLa Torre
parent 701ac2fa8f
commit 5e580ee3cb
3 changed files with 37 additions and 2 deletions

View File

@@ -267,7 +267,13 @@ class Tiller(object):
:result - will remove any chart that is not present in yaml
'''
valid_charts = [release_prefix(prefix, chart) for chart in charts]
valid_charts = []
for gchart in charts:
for chart in gchart.get('chart_group'):
valid_charts.append(release_prefix(prefix,
chart.get('chart')
.get('name')))
actual_charts = [x.name for x in self.list_releases()]
chart_diff = list(set(actual_charts) - set(valid_charts))