Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I upgrade a helm chart with a new values.yaml and keep the previous deployments data?

I deployed a helm chart using config-v1.yaml. I added some data to my helm chart app via an api exposed in the helm chart

I want to deploy/update the current chart with values from config-v2.yaml because there is a feature I want to expose.

When I use helm upgrade -f config-v2.yaml my-chart stable/chart. The previous helm version is blown away meaning the data I added with the API is gone. So I figure I need to add a volume to my container.

When I add a PersistentVolume and PersistentVolumeClaim, the app fails to update with values from config-v2.yaml which means I don't get the new features I want.

What is the proper way to do these types of updates to helm charts?

like image 202
nodox Avatar asked Oct 03 '18 19:10

nodox


Video Answer


1 Answers

To upgrade, use '--reuse-values' flag as you are providing extra customization to the existing values.

In your case, you can use

helm upgrade --reuse-values -f config-v2.yaml my-chart stable/chart

Please refer the docs.

like image 110
Vineet Palan Avatar answered Oct 13 '22 14:10

Vineet Palan