From e35bf1f93924ad7f9b1be732a9f2011f930bdd7c Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Fri, 2 Jun 2023 22:25:19 -0400 Subject: [PATCH] docs: add an example for using the upgrade command with existing values For users attempting to update a helm chart to add a missing config, it isn't totally clear how one should use helm upgrade. Signed-off-by: Jose Diaz-Gonzalez --- cmd/helm/upgrade.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/helm/upgrade.go b/cmd/helm/upgrade.go index 145d342b715..42262273dbd 100644 --- a/cmd/helm/upgrade.go +++ b/cmd/helm/upgrade.go @@ -65,6 +65,13 @@ last (right-most) set specified. For example, if both 'bar' and 'newbar' values set for a key called 'foo', the 'newbar' value would take precedence: $ helm upgrade --set foo=bar --set foo=newbar redis ./redis + +You can update the values for an existing release with this command as well via the +'--reuse-values' flag. The 'RELEASE' and 'CHART' arguments should be set to the original +parameters, and existing values will be merged with any values set via '--values'/'-f' +or '--set' flags. Priority is given to new values. + + $ helm upgrade --reuse-values --set foo=bar --set foo=newbar redis ./redis ` func newUpgradeCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {