I'm frequently installing multiple instances of an umbrella Helm chart across multiple namespaces for testing. I'd like to continue using the randomly generated names, but also be able to tear down multiple releases of the same chart in one command that doesn't need to change for each new release name.
So for charts like this:
$ helm ls
NAME REVISION UPDATED STATUS CHART NAMESPACE
braided-chimp 1 Mon Jul 23 15:52:43 2018 DEPLOYED foo-platform-0.2.1 foo-2
juiced-meerkat 1 Mon Jul 9 15:19:43 2018 DEPLOYED postgresql-0.9.4 default
sweet-sabertooth 1 Mon Jul 23 15:52:34 2018 DEPLOYED foo-platform-0.2.1 foo-1
I can delete all releases of the foo-platform-0.2.1
chart by typing the release names like:
$ helm delete braided-chimp sweet-sabertooth
But every time I run the command, I have to update it with the new release names.
Is it possible to run list / delete on all instances of a given chart across all namespaces based on the chart name? (I'm thinking something like what kubectl
supports with the -l
flag.)
For instance, how can I achieve something equivalent to this?
$ helm delete -l 'chart=foo-platform-0.2.1'
Is there a better way to do this?