diff --git a/armada/cli/apply.py b/armada/cli/apply.py index 97c49a8a..37634bfb 100644 --- a/armada/cli/apply.py +++ b/armada/cli/apply.py @@ -41,7 +41,7 @@ class ApplyChartsCommand(cmd.Command): default=False, help='Disable pre upgrade actions') parser.add_argument('--disable-update-post', action='store_true', default=False, help='Disable post upgrade actions') - parser.add_argument('--enable-chart-cleanup', action='store', + parser.add_argument('--enable-chart-cleanup', action='store_true', default=False, help='Enable Chart Clean Up') parser.add_argument('--wait', action='store_true', default=False, help='Wait until all charts' diff --git a/armada/handlers/tiller.py b/armada/handlers/tiller.py index e6e59ba4..61bcd389 100644 --- a/armada/handlers/tiller.py +++ b/armada/handlers/tiller.py @@ -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)) diff --git a/examples/simple.yaml b/examples/simple.yaml new file mode 100644 index 00000000..1c459de4 --- /dev/null +++ b/examples/simple.yaml @@ -0,0 +1,29 @@ +# For simple deployments + +armada: + release_prefix: armada + charts: + - description: Deploys Helm Toolkit and Mariadb + chart_group: + - chart: &blog-1 + name: blog-1 + release_name: blog-1 + namespace: default + values: {} + source: + type: git + location: https://github.com/gardlt/hello-world-chart + subpath: . + reference: master + dependencies: [] + - chart: &blog-2 + name: blog-2 + release_name: blog-2 + namespace: default + values: {} + source: + type: git + location: https://github.com/gardlt/hello-world-chart + subpath: . + reference: master + dependencies: []