Commit 084a2bb9 authored by Justin Scott's avatar Justin Scott

fix(helm): update helm reset --force tip for clarity

Updates helm reset error message to clarify that --force will not remove releases.

Closes #3394
parent 7609ad29
...@@ -77,7 +77,7 @@ func newResetCmd(client helm.Interface, out io.Writer) *cobra.Command { ...@@ -77,7 +77,7 @@ func newResetCmd(client helm.Interface, out io.Writer) *cobra.Command {
} }
f := cmd.Flags() f := cmd.Flags()
f.BoolVarP(&d.force, "force", "f", false, "forces Tiller uninstall even if there are releases installed, or if Tiller is not in ready state") f.BoolVarP(&d.force, "force", "f", false, "forces Tiller uninstall even if there are releases installed, or if Tiller is not in ready state. Releases are not deleted.)")
f.BoolVar(&d.removeHelmHome, "remove-helm-home", false, "if set deletes $HELM_HOME") f.BoolVar(&d.removeHelmHome, "remove-helm-home", false, "if set deletes $HELM_HOME")
return cmd return cmd
...@@ -101,7 +101,7 @@ func (d *resetCmd) run() error { ...@@ -101,7 +101,7 @@ func (d *resetCmd) run() error {
} }
if !d.force && res != nil && len(res.Releases) > 0 { if !d.force && res != nil && len(res.Releases) > 0 {
return fmt.Errorf("there are still %d deployed releases (Tip: use --force)", len(res.Releases)) return fmt.Errorf("there are still %d deployed releases (Tip: use --force to remove Tiller. Releases will not be deleted.)", len(res.Releases))
} }
if err := installer.Uninstall(d.kubeClient, &installer.Options{Namespace: d.namespace}); err != nil { if err := installer.Uninstall(d.kubeClient, &installer.Options{Namespace: d.namespace}); err != nil {
......
...@@ -121,7 +121,7 @@ func TestReset_deployedReleases(t *testing.T) { ...@@ -121,7 +121,7 @@ func TestReset_deployedReleases(t *testing.T) {
namespace: core.NamespaceDefault, namespace: core.NamespaceDefault,
} }
err = cmd.run() err = cmd.run()
expected := "there are still 1 deployed releases (Tip: use --force)" expected := "there are still 1 deployed releases (Tip: use --force to remove Tiller. Releases will not be deleted.)"
if !strings.Contains(err.Error(), expected) { if !strings.Contains(err.Error(), expected) {
t.Errorf("unexpected error: %v", err) t.Errorf("unexpected error: %v", err)
} }
......
...@@ -18,7 +18,7 @@ helm reset ...@@ -18,7 +18,7 @@ helm reset
### Options ### Options
``` ```
-f, --force forces Tiller uninstall even if there are releases installed, or if Tiller is not in ready state -f, --force forces Tiller uninstall even if there are releases installed, or if Tiller is not in ready state. Releases are not deleted.)
--remove-helm-home if set deletes $HELM_HOME --remove-helm-home if set deletes $HELM_HOME
--tls enable TLS for request --tls enable TLS for request
--tls-ca-cert string path to TLS CA certificate file (default "$HELM_HOME/ca.pem") --tls-ca-cert string path to TLS CA certificate file (default "$HELM_HOME/ca.pem")
...@@ -40,4 +40,4 @@ helm reset ...@@ -40,4 +40,4 @@ helm reset
### SEE ALSO ### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes. * [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 25-Jan-2018 ###### Auto generated by spf13/cobra on 8-Feb-2018
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment