From 24b17f8041b9bf7d0bbf28b0366e5e69393aa7f6 Mon Sep 17 00:00:00 2001 From: Nikolay Mahotkin Date: Sat, 17 Dec 2016 00:40:16 +0300 Subject: [PATCH 1/2] Rename '--restart' option to '--recreate' --- cmd/helm/rollback.go | 6 +++--- cmd/helm/upgrade.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/helm/rollback.go b/cmd/helm/rollback.go index fd41e4d76..764b28ad4 100644 --- a/cmd/helm/rollback.go +++ b/cmd/helm/rollback.go @@ -35,7 +35,7 @@ type rollbackCmd struct { name string revision int32 dryRun bool - restart bool + recreate bool disableHooks bool out io.Writer client helm.Interface @@ -72,7 +72,7 @@ func newRollbackCmd(c helm.Interface, out io.Writer) *cobra.Command { f := cmd.Flags() f.BoolVar(&rollback.dryRun, "dry-run", false, "simulate a rollback") - f.BoolVar(&rollback.restart, "restart", false, "performs pods restart for the resource if applicable") + f.BoolVar(&rollback.recreate, "recreate", false, "performs pods restart for the resource if applicable") f.BoolVar(&rollback.disableHooks, "no-hooks", false, "prevent hooks from running during rollback") return cmd @@ -82,7 +82,7 @@ func (r *rollbackCmd) run() error { _, err := r.client.RollbackRelease( r.name, helm.RollbackDryRun(r.dryRun), - helm.RollbackRecreate(r.restart), + helm.RollbackRecreate(r.recreate), helm.RollbackDisableHooks(r.disableHooks), helm.RollbackVersion(r.revision), ) diff --git a/cmd/helm/upgrade.go b/cmd/helm/upgrade.go index b279b8fd2..f936514c6 100644 --- a/cmd/helm/upgrade.go +++ b/cmd/helm/upgrade.go @@ -54,7 +54,7 @@ type upgradeCmd struct { out io.Writer client helm.Interface dryRun bool - restart bool + recreate bool disableHooks bool valueFiles valueFiles values string @@ -93,7 +93,7 @@ func newUpgradeCmd(client helm.Interface, out io.Writer) *cobra.Command { f := cmd.Flags() f.VarP(&upgrade.valueFiles, "values", "f", "specify values in a YAML file (can specify multiple)") f.BoolVar(&upgrade.dryRun, "dry-run", false, "simulate an upgrade") - f.BoolVar(&upgrade.restart, "restart", false, "performs pods restart for the resource if applicable") + f.BoolVar(&upgrade.recreate, "recreate", false, "performs pods restart for the resource if applicable") 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. DEPRECATED. Use no-hooks") f.BoolVar(&upgrade.disableHooks, "no-hooks", false, "disable pre/post upgrade hooks") @@ -151,7 +151,7 @@ func (u *upgradeCmd) run() error { chartPath, helm.UpdateValueOverrides(rawVals), helm.UpgradeDryRun(u.dryRun), - helm.UpgradeRecreate(u.restart), + helm.UpgradeRecreate(u.recreate), helm.UpgradeDisableHooks(u.disableHooks)) if err != nil { return fmt.Errorf("UPGRADE FAILED: %v", prettyError(err)) From c2d45805f3b7f447b9ec0d0e3a096e64fc8705cf Mon Sep 17 00:00:00 2001 From: Nikolay Mahotkin Date: Sat, 17 Dec 2016 00:46:55 +0300 Subject: [PATCH 2/2] Renaming --recreate to --recreate-pods --- cmd/helm/rollback.go | 2 +- cmd/helm/upgrade.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/helm/rollback.go b/cmd/helm/rollback.go index 764b28ad4..7e3e1adda 100644 --- a/cmd/helm/rollback.go +++ b/cmd/helm/rollback.go @@ -72,7 +72,7 @@ func newRollbackCmd(c helm.Interface, out io.Writer) *cobra.Command { f := cmd.Flags() f.BoolVar(&rollback.dryRun, "dry-run", false, "simulate a rollback") - f.BoolVar(&rollback.recreate, "recreate", false, "performs pods restart for the resource if applicable") + f.BoolVar(&rollback.recreate, "recreate-pods", false, "performs pods restart for the resource if applicable") f.BoolVar(&rollback.disableHooks, "no-hooks", false, "prevent hooks from running during rollback") return cmd diff --git a/cmd/helm/upgrade.go b/cmd/helm/upgrade.go index f936514c6..70ce9ea22 100644 --- a/cmd/helm/upgrade.go +++ b/cmd/helm/upgrade.go @@ -93,7 +93,7 @@ func newUpgradeCmd(client helm.Interface, out io.Writer) *cobra.Command { f := cmd.Flags() f.VarP(&upgrade.valueFiles, "values", "f", "specify values in a YAML file (can specify multiple)") f.BoolVar(&upgrade.dryRun, "dry-run", false, "simulate an upgrade") - f.BoolVar(&upgrade.recreate, "recreate", false, "performs pods restart for the resource if applicable") + f.BoolVar(&upgrade.recreate, "recreate-pods", false, "performs pods restart for the resource if applicable") 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. DEPRECATED. Use no-hooks") f.BoolVar(&upgrade.disableHooks, "no-hooks", false, "disable pre/post upgrade hooks")