From 352fea903d4dfa9daa4352988c3d8c852caa3845 Mon Sep 17 00:00:00 2001 From: Matt Butcher <technosophos@gmail.com> Date: Wed, 30 Nov 2016 11:37:59 -0700 Subject: [PATCH] fix(helm): add no-hooks to upgrade Mark disable-hooks as deprecated. Closes #1575 --- cmd/helm/upgrade.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/helm/upgrade.go b/cmd/helm/upgrade.go index d55a8013f..950c48c71 100644 --- a/cmd/helm/upgrade.go +++ b/cmd/helm/upgrade.go @@ -87,13 +87,16 @@ func newUpgradeCmd(client helm.Interface, out io.Writer) *cobra.Command { f.StringVarP(&upgrade.valuesFile, "values", "f", "", "path to a values YAML file") f.BoolVar(&upgrade.dryRun, "dry-run", false, "simulate an upgrade") f.StringVar(&upgrade.values, "set", "", "set values on the command line. Separate values with commas: key1=val1,key2=val2") - f.BoolVar(&upgrade.disableHooks, "disable-hooks", false, "disable pre/post upgrade hooks") + f.BoolVar(&upgrade.disableHooks, "disable-hooks", false, "disable pre/post upgrade hooks. DEPRECATED. Use no-hooks") + f.BoolVar(&upgrade.disableHooks, "no-hooks", false, "disable pre/post upgrade hooks") f.BoolVar(&upgrade.verify, "verify", false, "verify the provenance of the chart before upgrading") f.StringVar(&upgrade.keyring, "keyring", defaultKeyring(), "path to the keyring that contains public singing keys") 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", "default", "namespace to install the release into (only used if --install is set)") f.StringVar(&upgrade.version, "version", "", "specify the exact chart version to use. If this is not specified, the latest version is used") + f.MarkDeprecated("disable-hooks", "use --no-hooks instead") + return cmd } -- GitLab