mirror of
https://github.com/portainer/portainer.git
synced 2026-08-07 11:04:49 +00:00
fix(addons): handle empty strings in add-on config forms [R8S-1188] (#3262)
This commit is contained in:
@@ -17,6 +17,9 @@ type InstallOptions struct {
|
||||
// Values contains inline Helm values merged with the chart defaults.
|
||||
// If both are provided, entries in Values override those from ValuesFile.
|
||||
Values map[string]any
|
||||
// ResetValues resets to chart defaults before applying Values on upgrade
|
||||
// (Helm's --reset-values), so omitted keys revert rather than persist.
|
||||
ResetValues bool
|
||||
// ValuesFile is a path to a YAML file with Helm values to apply.
|
||||
// File values are applied first; Values take precedence on conflicts.
|
||||
ValuesFile string
|
||||
|
||||
@@ -190,6 +190,7 @@ func initUpgradeClient(actionConfig *action.Configuration, upgradeOpts options.I
|
||||
}
|
||||
upgradeClient.TakeOwnership = upgradeOpts.TakeOwnership // Equivalent to --take-ownership flag
|
||||
upgradeClient.MaxHistory = upgradeOpts.MaxHistory
|
||||
upgradeClient.ResetValues = upgradeOpts.ResetValues // Equivalent to --reset-values flag; off unless the caller opts in
|
||||
err := configureChartPathOptions(&upgradeClient.ChartPathOptions, upgradeOpts.Version, upgradeOpts.Repo, upgradeOpts.Registry)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "failed to configure chart path options for helm release upgrade")
|
||||
|
||||
Reference in New Issue
Block a user