When running helm upgrade...
, I'd like to be able to detect the currently deployed Chart version so I can set specific template values based on it.
Something like {{ Release.ChartVersion }}
or {{ Chart.InstalledVersion }}
.
I'm familiar with the official guide, but was not able to find a way to do this.
Unfortunately running helm upgrade not check the currently installed version, just run an upgrade. But you can check installed version by running: helm ls
. You'll see the table of installed packages in the cluster. You can find and check the chart version:
MY_PACKAGE_VERSION=$(helm ls | grep 'my-best-chart-name' | awk '{ print $10 }')