From 945d87e394a5a35e4f5f00fffc7719c58633753b Mon Sep 17 00:00:00 2001 From: Alexander Nesterenko Date: Mon, 11 Mar 2019 18:33:06 +0200 Subject: [PATCH] Update docs and add one missing place Signed-off-by: Alexander Nesterenko --- cmd/helm/init.go | 3 +-- cmd/helm/root.go | 8 ++++---- docs/faq.md | 9 ++++++--- docs/glossary.md | 6 +++++- pkg/helm/environment/default_home_dir.go | 4 ++-- 5 files changed, 18 insertions(+), 12 deletions(-) diff --git a/cmd/helm/init.go b/cmd/helm/init.go index 4aeb64866..44f28a2bc 100644 --- a/cmd/helm/init.go +++ b/cmd/helm/init.go @@ -38,8 +38,7 @@ import ( const initDesc = ` This command sets up local configuration in $XDG_CONFIG_HOME/helm ($HOME/.config/helm on Linux, %APPDATA%\helm on Windows and -$HOME/Library/Preferences on OSX). -NOTE: if there is old-style "$HOME/.helm" directory, it will be preffered. +$HOME/Library/Preferences/helm on macOS). ` const ( diff --git a/cmd/helm/root.go b/cmd/helm/root.go index 2cda3a59b..dc066c7bb 100644 --- a/cmd/helm/root.go +++ b/cmd/helm/root.go @@ -45,12 +45,12 @@ Common actions from this point include: Environment: $HELM_HOME set an alternative location for Helm files. By default, these are stored in - "$XDG_CONFIG_DIR/helm" ("$HOME/.config/helm" on Linux, - "%APPDATA%\helm" on Windows and "$HOME/Library/Preferences" on OSX). - NOTE: if there is old-style "$HOME/.helm" directory, it will be used. + $XDG_CONFIG_DIR/helm ($HOME/.config/helm on Linux, %APPDATA%\helm on Windows + and $HOME/Library/Preferences/helm on macOS). + NOTE: if there is old-style $HOME/.helm directory, it will be used. $HELM_DRIVER set the backend storage driver. Values are: configmap, secret, memory $HELM_NO_PLUGINS disable plugins. Set HELM_NO_PLUGINS=1 to disable plugins. - $KUBECONFIG set an alternative Kubernetes configuration file (default "$HOME/.kube/config") + $KUBECONFIG set an alternative Kubernetes configuration file (default $HOME/.kube/config) ` // TODO: 'c helm.Interface' is deprecated in favor of actionConfig diff --git a/docs/faq.md b/docs/faq.md index 788237764..02c5aaa84 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -26,7 +26,7 @@ We provide it because it is useful, but we suggest that users carefully read the script first. What we'd really like, though, are better packaged releases of Helm. -### How do I put the Helm client files somewhere other than ~/.helm? +### How do I put the Helm client files somewhere other than default location? Set the `$HELM_HOME` environment variable, and then run `helm init`: @@ -44,8 +44,11 @@ with `helm repo add...`. ### I want to delete my local Helm. Where are all its files? Along with the `helm` binary, Helm stores some files in `$HELM_HOME`, which is -located by default in `~/.helm`. - +located by default in one of following directories: + * `$HOME/.config/helm` on Linux + * `$HOME/Library/Preferences/helm` on macOS + * `%APPDATA%\helm` on Windows + * `$HOME/.helm` if you have used helm before 3rd release ## Troubleshooting diff --git a/docs/glossary.md b/docs/glossary.md index c95e8561e..5ea8789a8 100644 --- a/docs/glossary.md +++ b/docs/glossary.md @@ -57,7 +57,11 @@ capitalized. When speaking of the client, _helm_ is in lowercase. ## Helm Home (HELM_HOME) The Helm client stores information in a local directory referred to as -_helm home_. By default, this is in the `$HOME/.helm` directory. +_helm home_. By default, it is located in one of these directories: + * `$HOME/.config/helm` on Linux + * `$HOME/Library/Preferences/helm` on OSx + * `%APPDATA%\helm` on Windows + * `$HOME/.helm` if you have used helm before 3rd release This directory contains configuration and cache data, and is created by `helm init`. diff --git a/pkg/helm/environment/default_home_dir.go b/pkg/helm/environment/default_home_dir.go index d3483d524..3f2b9ed30 100644 --- a/pkg/helm/environment/default_home_dir.go +++ b/pkg/helm/environment/default_home_dir.go @@ -25,8 +25,8 @@ import ( // New default helm home, with different paths for different OS: // - %APPDATA%\helm on Windows -// - $HOME/Library/Preferences/helm on OSX -// - $kXDG_CONFIG_HOME/helm (typically $HOME/.config/helm for Linux) +// - $HOME/Library/Preferences/helm on macOS +// - $XDG_CONFIG_HOME/helm (typically $HOME/.config/helm for Linux) var defaultHelmHome = xdg.App{Name: "helm"}.ConfigPath("") // Old default helm home, it's old good $HELM/.helm