cli: helm: separate user input from static loading

Because values in the charts might change in the future and
some values (like the image) are part of a valid upgrade we
need to load all values for an upgrade.
However, during upgrades we don't want to reapply user
input like the masterSecret. Therefore this patch splits the
application of user input and the static loading of chart values.
This commit is contained in:
Otto Bittner 2023-02-14 16:41:19 +01:00
parent 69a384d978
commit 1728633646
3 changed files with 75 additions and 42 deletions

View file

@ -171,7 +171,7 @@ func (c *Client) upgradeRelease(
return nil
}
// prepareCertManagerValues returns a values map as required for helm-upgrade.
// prepareValues returns a values map as required for helm-upgrade.
// It imitates the behaviour of helm's reuse-values flag by fetching the current values from the cluster
// and merging the fetched values with the locally found values.
// This is done to ensure that new values (from upgrades of the local files) end up in the cluster.