When 'helm install/upgrade --app-version 1.0.0' is run, this will
override the chart app version
Closes#3555
Signed-off-by: Kevin Labesse <kevin@labesse.me>
docs(helm): add --app-version flags for 'helm install/upgrade'
Signed-off-by: Kevin Labesse <kevin@labesse.me>
f.BoolVar(&inst.verify,"verify",false,"verify the package before installing it")
f.BoolVar(&inst.verify,"verify",false,"verify the package before installing it")
f.StringVar(&inst.keyring,"keyring",defaultKeyring(),"location of public keys used for verification")
f.StringVar(&inst.keyring,"keyring",defaultKeyring(),"location of public keys used for verification")
f.StringVar(&inst.version,"version","","specify the exact chart version to install. If this is not specified, the latest version is installed")
f.StringVar(&inst.version,"version","","specify the exact chart version to install. If this is not specified, the latest version is installed")
f.StringVar(&inst.appVersion,"app-version","","specify an app version for the release")
f.Int64Var(&inst.timeout,"timeout",300,"time in seconds to wait for any individual Kubernetes operation (like Jobs for hooks)")
f.Int64Var(&inst.timeout,"timeout",300,"time in seconds to wait for any individual Kubernetes operation (like Jobs for hooks)")
f.BoolVar(&inst.wait,"wait",false,"if set, will wait until all Pods, PVCs, Services, and minimum number of Pods of a Deployment are in a ready state before marking the release as successful. It will wait for as long as --timeout")
f.BoolVar(&inst.wait,"wait",false,"if set, will wait until all Pods, PVCs, Services, and minimum number of Pods of a Deployment are in a ready state before marking the release as successful. It will wait for as long as --timeout")
f.StringVar(&inst.repoURL,"repo","","chart repository url where to locate the requested chart")
f.StringVar(&inst.repoURL,"repo","","chart repository url where to locate the requested chart")
@ -291,6 +293,10 @@ func (i *installCmd) run() error {
f.BoolVarP(&upgrade.install,"install","i",false,"if a release by this name doesn't already exist, run an install")
f.BoolVarP(&upgrade.install,"install","i",false,"if a release by this name doesn't already exist, run an install")
f.StringVar(&upgrade.namespace,"namespace","","namespace to install the release into (only used if --install is set). Defaults to the current kube config namespace")
f.StringVar(&upgrade.namespace,"namespace","","namespace to install the release into (only used if --install is set). Defaults to the current kube config namespace")
f.StringVar(&upgrade.version,"version","","specify the exact chart version to use. If this is not specified, the latest version is used")
f.StringVar(&upgrade.version,"version","","specify the exact chart version to use. If this is not specified, the latest version is used")
f.StringVar(&upgrade.appVersion,"app-version","","specify the app version to use for the upgrade")
f.Int64Var(&upgrade.timeout,"timeout",300,"time in seconds to wait for any individual Kubernetes operation (like Jobs for hooks)")
f.Int64Var(&upgrade.timeout,"timeout",300,"time in seconds to wait for any individual Kubernetes operation (like Jobs for hooks)")
f.BoolVar(&upgrade.resetValues,"reset-values",false,"when upgrading, reset the values to the ones built into the chart")
f.BoolVar(&upgrade.resetValues,"reset-values",false,"when upgrading, reset the values to the ones built into the chart")
f.BoolVar(&upgrade.reuseValues,"reuse-values",false,"when upgrading, reuse the last release's values and merge in any overrides from the command line via --set and -f. If '--reset-values' is specified, this is ignored.")
f.BoolVar(&upgrade.reuseValues,"reuse-values",false,"when upgrading, reuse the last release's values and merge in any overrides from the command line via --set and -f. If '--reset-values' is specified, this is ignored.")
@ -227,6 +229,7 @@ func (u *upgradeCmd) run() error {
stringValues:u.stringValues,
stringValues:u.stringValues,
fileValues:u.fileValues,
fileValues:u.fileValues,
namespace:u.namespace,
namespace:u.namespace,
appVersion:u.appVersion,
timeout:u.timeout,
timeout:u.timeout,
wait:u.wait,
wait:u.wait,
description:u.description,
description:u.description,
@ -240,22 +243,28 @@ func (u *upgradeCmd) run() error {
returnerr
returnerr
}
}
// load the chart to update
chart,err:=chartutil.Load(chartPath)
iferr!=nil{
returnprettyError(err)
}
// Check chart requirements to make sure all dependencies are present in /charts
// Check chart requirements to make sure all dependencies are present in /charts