Commit 82723606 authored by Adam Reese's avatar Adam Reese Committed by GitHub

Merge pull request #2476 from adamreese/fix/flag-envars

fix(helm): fix race conditions in flag parsing
parents 3647e607 faf560c5
......@@ -87,7 +87,7 @@ func TestCreateStarterCmd(t *testing.T) {
if err != nil {
t.Fatal(err)
}
old := helmpath.Home(environment.DefaultHelmHome())
old := helmpath.Home(environment.DefaultHelmHome)
settings.Home = thome
defer func() {
settings.Home = old
......
......@@ -57,7 +57,7 @@ func newDeleteCmd(c helm.Interface, out io.Writer) *cobra.Command {
SuggestFor: []string{"remove", "rm"},
Short: "given a release name, delete the release from Kubernetes",
Long: deleteDesc,
PersistentPreRunE: setupConnection,
PreRunE: setupConnection,
RunE: func(cmd *cobra.Command, args []string) error {
if len(args) == 0 {
return errors.New("command 'delete' requires a release name")
......
......@@ -34,7 +34,7 @@ func TestFetchCmd(t *testing.T) {
if err != nil {
t.Fatal(err)
}
old := helmpath.Home(environment.DefaultHelmHome())
old := helmpath.Home(environment.DefaultHelmHome)
settings.Home = hh
defer func() {
settings.Home = old
......
......@@ -57,7 +57,7 @@ func newGetCmd(client helm.Interface, out io.Writer) *cobra.Command {
Use: "get [flags] RELEASE_NAME",
Short: "download a named release",
Long: getHelp,
PersistentPreRunE: setupConnection,
PreRunE: setupConnection,
RunE: func(cmd *cobra.Command, args []string) error {
if len(args) == 0 {
return errReleaseRequired
......
......@@ -19,7 +19,6 @@ package main // import "k8s.io/helm/cmd/helm"
import (
"errors"
"fmt"
"io"
"io/ioutil"
"log"
"os"
......@@ -39,23 +38,16 @@ import (
"k8s.io/helm/pkg/tlsutil"
)
const (
localRepoIndexFilePath = "index.yaml"
)
var (
tlsCaCertFile string // path to TLS CA certificate file
tlsCertFile string // path to TLS certificate file
tlsKeyFile string // path to TLS key file
tlsVerify bool // enable TLS and verify remote certificates
tlsEnable bool // enable TLS
)
var (
kubeContext string
settings helm_env.EnvSettings
// TODO refactor out this global var
tillerTunnel *kube.Tunnel
settings helm_env.EnvSettings
)
var globalUsage = `The Kubernetes package manager
......@@ -82,34 +74,58 @@ Environment:
$KUBECONFIG set an alternative Kubernetes configuration file (default "~/.kube/config")
`
func newRootCmd(out io.Writer) *cobra.Command {
func setFlagFromEnv(name, envar string, cmd *cobra.Command) {
if cmd.Flags().Changed(name) {
return
}
if v, ok := os.LookupEnv(envar); ok {
cmd.Flags().Set(name, v)
}
}
func setFlagsFromEnv(flags map[string]string, cmd *cobra.Command) {
for name, envar := range flags {
setFlagFromEnv(name, envar, cmd)
}
}
func addRootFlags(cmd *cobra.Command) {
pf := cmd.PersistentFlags()
pf.StringVar((*string)(&settings.Home), "home", helm_env.DefaultHelmHome, "location of your Helm config. Overrides $HELM_HOME")
pf.StringVar(&settings.TillerHost, "host", "", "address of tiller. Overrides $HELM_HOST")
pf.StringVar(&kubeContext, "kube-context", "", "name of the kubeconfig context to use")
pf.BoolVar(&settings.Debug, "debug", false, "enable verbose output")
pf.StringVar(&settings.TillerNamespace, "tiller-namespace", tiller_env.DefaultTillerNamespace, "namespace of tiller")
}
func initRootFlags(cmd *cobra.Command) {
setFlagsFromEnv(map[string]string{
"debug": helm_env.DebugEnvVar,
"home": helm_env.HomeEnvVar,
"host": helm_env.HostEnvVar,
"tiller-namespace": tiller_env.TillerNamespaceEnvVar,
}, cmd.Root())
tlsCaCertFile = os.ExpandEnv(tlsCaCertFile)
tlsCertFile = os.ExpandEnv(tlsCertFile)
tlsKeyFile = os.ExpandEnv(tlsKeyFile)
}
func newRootCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "helm",
Short: "The Helm package manager for Kubernetes.",
Long: globalUsage,
SilenceUsage: true,
PersistentPreRun: func(cmd *cobra.Command, args []string) {
tlsCaCertFile = os.ExpandEnv(tlsCaCertFile)
tlsCertFile = os.ExpandEnv(tlsCertFile)
tlsKeyFile = os.ExpandEnv(tlsKeyFile)
PersistentPreRun: func(cmd *cobra.Command, _ []string) {
initRootFlags(cmd)
},
PersistentPostRun: func(cmd *cobra.Command, args []string) {
PersistentPostRun: func(*cobra.Command, []string) {
teardown()
},
}
p := cmd.PersistentFlags()
p.StringVar((*string)(&settings.Home), "home", helm_env.DefaultHelmHome(), "location of your Helm config. Overrides $HELM_HOME")
p.StringVar(&settings.TillerHost, "host", helm_env.DefaultHelmHost(), "address of tiller. Overrides $HELM_HOST")
p.StringVar(&kubeContext, "kube-context", "", "name of the kubeconfig context to use")
p.BoolVar(&settings.Debug, "debug", false, "enable verbose output")
p.StringVar(&settings.TillerNamespace, "tiller-namespace", tiller_env.GetTillerNamespace(), "namespace of tiller")
if os.Getenv(helm_env.PluginDisableEnvVar) != "1" {
settings.PlugDirs = os.Getenv(helm_env.PluginEnvVar)
if settings.PlugDirs == "" {
settings.PlugDirs = settings.Home.Plugins()
}
}
addRootFlags(cmd)
out := cmd.OutOrStdout()
cmd.AddCommand(
// chart commands
......@@ -139,7 +155,7 @@ func newRootCmd(out io.Writer) *cobra.Command {
addFlagsTLS(newVersionCmd(nil, out)),
newCompletionCmd(out),
newHomeCmd(out),
newHomeCmd(),
newInitCmd(out),
newPluginCmd(out),
......@@ -162,7 +178,7 @@ func init() {
}
func main() {
cmd := newRootCmd(os.Stdout)
cmd := newRootCmd()
if err := cmd.Execute(); err != nil {
os.Exit(1)
}
......
......@@ -23,6 +23,7 @@ import (
"io/ioutil"
"math/rand"
"os"
"path/filepath"
"regexp"
"sync"
"testing"
......@@ -321,7 +322,7 @@ func ensureTestHome(home helmpath.Home, t *testing.T) error {
}
}
localRepoIndexFile := home.LocalRepository(localRepoIndexFilePath)
localRepoIndexFile := home.LocalRepository(localRepositoryIndexFile)
if fi, err := os.Stat(localRepoIndexFile); err != nil {
i := repo.NewIndexFile()
if err := i.WriteFile(localRepoIndexFile, 0644); err != nil {
......@@ -337,3 +338,77 @@ func ensureTestHome(home helmpath.Home, t *testing.T) error {
t.Logf("$HELM_HOME has been configured at %s.\n", settings.Home.String())
return nil
}
func TestRootCmd(t *testing.T) {
oldhome := os.Getenv("HELM_HOME")
defer os.Setenv("HELM_HOME", oldhome)
tests := []struct {
name string
args []string
envars map[string]string
home string
}{
{
name: "defaults",
home: filepath.Join(os.Getenv("HOME"), "/.helm"),
},
{
name: "with --home set",
args: []string{"--home", "/foo"},
home: "/foo",
},
{
name: "subcommands with --home set",
args: []string{"home", "--home", "/foo"},
home: "/foo",
},
{
name: "with $HELM_HOME set",
envars: map[string]string{"HELM_HOME": "/bar"},
home: "/bar",
},
{
name: "subcommands with $HELM_HOME set",
args: []string{"home"},
envars: map[string]string{"HELM_HOME": "/bar"},
home: "/bar",
},
{
name: "with $HELM_HOME and --home set",
args: []string{"home", "--home", "/foo"},
envars: map[string]string{"HELM_HOME": "/bar"},
home: "/foo",
},
}
// ensure not set locally
os.Unsetenv("HELM_HOME")
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
defer os.Unsetenv("HELM_HOME")
for k, v := range tt.envars {
os.Setenv(k, v)
}
cmd := newRootCmd()
cmd.SetOutput(ioutil.Discard)
cmd.SetArgs(tt.args)
cmd.Run = func(*cobra.Command, []string) {}
if err := cmd.Execute(); err != nil {
t.Errorf("unexpected error: %s", err)
}
if settings.Home.String() != tt.home {
t.Errorf("expected home %q, got %q", tt.home, settings.Home)
}
homeFlag := cmd.Flag("home").Value.String()
homeFlag = os.ExpandEnv(homeFlag)
if homeFlag != tt.home {
t.Errorf("expected home %q, got %q", tt.home, homeFlag)
}
})
}
}
......@@ -60,7 +60,7 @@ func newHistoryCmd(c helm.Interface, w io.Writer) *cobra.Command {
Long: historyHelp,
Short: "fetch release history",
Aliases: []string{"hist"},
PersistentPreRunE: setupConnection,
PreRunE: setupConnection,
RunE: func(cmd *cobra.Command, args []string) error {
switch {
case len(args) == 0:
......
......@@ -17,9 +17,6 @@ limitations under the License.
package main
import (
"fmt"
"io"
"github.com/spf13/cobra"
)
......@@ -28,25 +25,24 @@ This command displays the location of HELM_HOME. This is where
any helm configuration files live.
`
func newHomeCmd(out io.Writer) *cobra.Command {
func newHomeCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "home",
Short: "displays the location of HELM_HOME",
Long: longHomeHelp,
Run: func(cmd *cobra.Command, args []string) {
h := settings.Home
fmt.Fprintf(out, "%s\n", h)
cmd.Println(h)
if settings.Debug {
fmt.Fprintf(out, "Repository: %s\n", h.Repository())
fmt.Fprintf(out, "RepositoryFile: %s\n", h.RepositoryFile())
fmt.Fprintf(out, "Cache: %s\n", h.Cache())
fmt.Fprintf(out, "Stable CacheIndex: %s\n", h.CacheIndex("stable"))
fmt.Fprintf(out, "Starters: %s\n", h.Starters())
fmt.Fprintf(out, "LocalRepository: %s\n", h.LocalRepository())
fmt.Fprintf(out, "Plugins: %s\n", h.Plugins())
cmd.Printf("Repository: %s\n", h.Repository())
cmd.Printf("RepositoryFile: %s\n", h.RepositoryFile())
cmd.Printf("Cache: %s\n", h.Cache())
cmd.Printf("Stable CacheIndex: %s\n", h.CacheIndex("stable"))
cmd.Printf("Starters: %s\n", h.Starters())
cmd.Printf("LocalRepository: %s\n", h.LocalRepository())
cmd.Printf("Plugins: %s\n", h.Plugins())
}
},
}
return cmd
}
......@@ -56,6 +56,7 @@ To dump a manifest containing the Tiller deployment YAML, combine the
const (
stableRepository = "stable"
localRepository = "local"
localRepositoryIndexFile = "index.yaml"
)
var (
......@@ -296,7 +297,7 @@ func ensureDefaultRepos(home helmpath.Home, out io.Writer, skipRefresh bool) err
if err != nil {
return err
}
lr, err := initLocalRepo(home.LocalRepository(localRepoIndexFilePath), home.CacheIndex("local"))
lr, err := initLocalRepo(home.LocalRepository(localRepositoryIndexFile), home.CacheIndex("local"))
if err != nil {
return err
}
......
......@@ -214,7 +214,7 @@ func TestEnsureHome(t *testing.T) {
t.Errorf("%s should not be a directory", fi)
}
if fi, err := os.Stat(hh.LocalRepository(localRepoIndexFilePath)); err != nil {
if fi, err := os.Stat(hh.LocalRepository(localRepositoryIndexFile)); err != nil {
t.Errorf("%s", err)
} else if fi.IsDir() {
t.Errorf("%s should not be a directory", fi)
......
......@@ -151,7 +151,7 @@ func newInstallCmd(c helm.Interface, out io.Writer) *cobra.Command {
Use: "install [CHART]",
Short: "install a chart archive",
Long: installDesc,
PersistentPreRunE: setupConnection,
PreRunE: setupConnection,
RunE: func(cmd *cobra.Command, args []string) error {
if err := checkArgsLength(len(args), "chart name"); err != nil {
return err
......
......@@ -86,7 +86,7 @@ func newListCmd(client helm.Interface, out io.Writer) *cobra.Command {
Short: "list releases",
Long: listHelp,
Aliases: []string{"ls"},
PersistentPreRunE: setupConnection,
PreRunE: setupConnection,
RunE: func(cmd *cobra.Command, args []string) error {
if len(args) > 0 {
list.filter = strings.Join(args, " ")
......
......@@ -25,19 +25,10 @@ import (
"github.com/spf13/cobra"
"k8s.io/helm/pkg/helm/helmpath"
helm_env "k8s.io/helm/pkg/helm/environment"
"k8s.io/helm/pkg/plugin"
)
const pluginEnvVar = "HELM_PLUGIN"
func pluginDirs(home helmpath.Home) string {
if dirs := os.Getenv(pluginEnvVar); dirs != "" {
return dirs
}
return home.Plugins()
}
// loadPlugins loads plugins into the command list.
//
// This follows a different pattern than the other commands because it has
......@@ -46,16 +37,25 @@ func pluginDirs(home helmpath.Home) string {
func loadPlugins(baseCmd *cobra.Command, out io.Writer) {
// If HELM_NO_PLUGINS is set to 1, do not load plugins.
if settings.PlugDirs == "" {
if os.Getenv(helm_env.PluginDisableEnvVar) == "1" {
return
}
found, err := findPlugins(settings.PlugDirs)
found, err := findPlugins(settings.PluginDirs())
if err != nil {
fmt.Fprintf(os.Stderr, "failed to load plugins: %s", err)
return
}
processParent := func(cmd *cobra.Command, args []string) ([]string, error) {
k, u := manuallyProcessArgs(args)
if err := cmd.Parent().ParseFlags(k); err != nil {
return nil, err
}
initRootFlags(cmd)
return u, nil
}
// Now we create commands for all of these.
for _, plug := range found {
plug := plug
......@@ -69,9 +69,8 @@ func loadPlugins(baseCmd *cobra.Command, out io.Writer) {
Short: md.Usage,
Long: md.Description,
RunE: func(cmd *cobra.Command, args []string) error {
k, u := manuallyProcessArgs(args)
if err := cmd.Parent().ParseFlags(k); err != nil {
u, err := processParent(cmd, args)
if err != nil {
return err
}
......@@ -99,10 +98,9 @@ func loadPlugins(baseCmd *cobra.Command, out io.Writer) {
}
if md.UseTunnel {
c.PersistentPreRunE = func(cmd *cobra.Command, args []string) error {
c.PreRunE = func(cmd *cobra.Command, args []string) error {
// Parse the parent flag, but not the local flags.
k, _ := manuallyProcessArgs(args)
if err := c.Parent().ParseFlags(k); err != nil {
if _, err := processParent(cmd, args); err != nil {
return err
}
return setupConnection(cmd, args)
......
......@@ -44,11 +44,8 @@ func newPluginListCmd(out io.Writer) *cobra.Command {
}
func (pcmd *pluginListCmd) run() error {
plugdirs := pluginDirs(pcmd.home)
debug("pluginDirs: %s", plugdirs)
plugins, err := findPlugins(plugdirs)
debug("pluginDirs: %s", settings.PluginDirs())
plugins, err := findPlugins(settings.PluginDirs())
if err != nil {
return err
}
......
......@@ -59,9 +59,8 @@ func (pcmd *pluginRemoveCmd) complete(args []string) error {
}
func (pcmd *pluginRemoveCmd) run() error {
plugdirs := pluginDirs(pcmd.home)
debug("loading installed plugins from %s", plugdirs)
plugins, err := findPlugins(plugdirs)
debug("loading installed plugins from %s", settings.PluginDirs())
plugins, err := findPlugins(settings.PluginDirs())
if err != nil {
return err
}
......
......@@ -23,6 +23,7 @@ import (
"strings"
"testing"
helm_env "k8s.io/helm/pkg/helm/environment"
"k8s.io/helm/pkg/helm/helmpath"
"k8s.io/helm/pkg/plugin"
......@@ -71,7 +72,6 @@ func TestLoadPlugins(t *testing.T) {
settings.Home = old
}()
hh := settings.Home
settings.PlugDirs = hh.Plugins()
out := bytes.NewBuffer(nil)
cmd := &cobra.Command{}
......@@ -139,12 +139,11 @@ func TestLoadPlugins(t *testing.T) {
func TestLoadPlugins_HelmNoPlugins(t *testing.T) {
// Set helm home to point to testdata
old := settings.Home
oldPlugDirs := settings.PlugDirs
settings.Home = "testdata/helmhome"
settings.PlugDirs = ""
os.Setenv(helm_env.PluginDisableEnvVar, "1")
defer func() {
settings.Home = old
settings.PlugDirs = oldPlugDirs
os.Unsetenv(helm_env.PluginDisableEnvVar)
}()
out := bytes.NewBuffer(nil)
......@@ -161,7 +160,6 @@ func TestSetupEnv(t *testing.T) {
name := "pequod"
settings.Home = helmpath.Home("testdata/helmhome")
base := filepath.Join(settings.Home.Plugins(), name)
settings.PlugDirs = settings.Home.Plugins()
settings.Debug = true
defer func() {
settings.Debug = false
......
......@@ -61,9 +61,8 @@ func (pcmd *pluginUpdateCmd) complete(args []string) error {
func (pcmd *pluginUpdateCmd) run() error {
installer.Debug = settings.Debug
plugdirs := pluginDirs(pcmd.home)
debug("loading installed plugins from %s", plugdirs)
plugins, err := findPlugins(plugdirs)
debug("loading installed plugins from %s", settings.PluginDirs())
plugins, err := findPlugins(settings.PluginDirs())
if err != nil {
return err
}
......
......@@ -51,7 +51,7 @@ func newReleaseTestCmd(c helm.Interface, out io.Writer) *cobra.Command {
Use: "test [RELEASE]",
Short: "test a release",
Long: releaseTestDesc,
PersistentPreRunE: setupConnection,
PreRunE: setupConnection,
RunE: func(cmd *cobra.Command, args []string) error {
if err := checkArgsLength(len(args), "release name"); err != nil {
return err
......
......@@ -57,7 +57,7 @@ func newResetCmd(client helm.Interface, out io.Writer) *cobra.Command {
Use: "reset",
Short: "uninstalls Tiller from a cluster",
Long: resetDesc,
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
PreRunE: func(cmd *cobra.Command, args []string) error {
if err := setupConnection(cmd, args); !d.force && err != nil {
return err
}
......
......@@ -57,7 +57,7 @@ func newRollbackCmd(c helm.Interface, out io.Writer) *cobra.Command {
Use: "rollback [flags] [RELEASE] [REVISION]",
Short: "roll back a release to a previous revision",
Long: rollbackDesc,
PersistentPreRunE: setupConnection,
PreRunE: setupConnection,
RunE: func(cmd *cobra.Command, args []string) error {
if err := checkArgsLength(len(args), "release name", "revision number"); err != nil {
return err
......
......@@ -60,7 +60,7 @@ func newStatusCmd(client helm.Interface, out io.Writer) *cobra.Command {
Use: "status [flags] RELEASE_NAME",
Short: "displays the status of the named release",
Long: statusHelp,
PersistentPreRunE: setupConnection,
PreRunE: setupConnection,
RunE: func(cmd *cobra.Command, args []string) error {
if len(args) == 0 {
return errReleaseRequired
......
......@@ -94,7 +94,7 @@ func newUpgradeCmd(client helm.Interface, out io.Writer) *cobra.Command {
Use: "upgrade [RELEASE] [CHART]",
Short: "upgrade a release",
Long: upgradeDesc,
PersistentPreRunE: setupConnection,
PreRunE: setupConnection,
RunE: func(cmd *cobra.Command, args []string) error {
if err := checkArgsLength(len(args), "release name", "chart path"); err != nil {
return err
......
......@@ -33,7 +33,7 @@ Environment:
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -66,4 +66,4 @@ Environment:
* [helm verify](helm_verify.md) - verify that a chart at the given path has been signed and is valid
* [helm version](helm_version.md) - print the client/server version information
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -25,7 +25,7 @@ helm completion SHELL
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -34,4 +34,4 @@ helm completion SHELL
### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -44,7 +44,7 @@ helm create NAME
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -53,4 +53,4 @@ helm create NAME
### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -35,7 +35,7 @@ helm delete [flags] RELEASE_NAME [...]
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -44,4 +44,4 @@ helm delete [flags] RELEASE_NAME [...]
### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -58,7 +58,7 @@ for this case.
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -70,4 +70,4 @@ for this case.
* [helm dependency list](helm_dependency_list.md) - list the dependencies for the given chart
* [helm dependency update](helm_dependency_update.md) - update charts/ based on the contents of requirements.yaml
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -31,7 +31,7 @@ helm dependency build [flags] CHART
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -40,4 +40,4 @@ helm dependency build [flags] CHART
### SEE ALSO
* [helm dependency](helm_dependency.md) - manage a chart's dependencies
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -23,7 +23,7 @@ helm dependency list [flags] CHART
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -32,4 +32,4 @@ helm dependency list [flags] CHART
### SEE ALSO
* [helm dependency](helm_dependency.md) - manage a chart's dependencies
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -36,7 +36,7 @@ helm dependency update [flags] CHART
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -45,4 +45,4 @@ helm dependency update [flags] CHART
### SEE ALSO
* [helm dependency](helm_dependency.md) - manage a chart's dependencies
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -45,7 +45,7 @@ helm fetch [flags] [chart URL | repo/chartname] [...]
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -54,4 +54,4 @@ helm fetch [flags] [chart URL | repo/chartname] [...]
### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -37,7 +37,7 @@ helm get [flags] RELEASE_NAME
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -49,4 +49,4 @@ helm get [flags] RELEASE_NAME
* [helm get manifest](helm_get_manifest.md) - download the manifest for a named release
* [helm get values](helm_get_values.md) - download the values file for a named release
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -25,7 +25,7 @@ helm get hooks [flags] RELEASE_NAME
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -34,4 +34,4 @@ helm get hooks [flags] RELEASE_NAME
### SEE ALSO
* [helm get](helm_get.md) - download a named release
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -27,7 +27,7 @@ helm get manifest [flags] RELEASE_NAME
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -36,4 +36,4 @@ helm get manifest [flags] RELEASE_NAME
### SEE ALSO
* [helm get](helm_get.md) - download a named release
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -24,7 +24,7 @@ helm get values [flags] RELEASE_NAME
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -33,4 +33,4 @@ helm get values [flags] RELEASE_NAME
### SEE ALSO
* [helm get](helm_get.md) - download a named release
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -40,7 +40,7 @@ helm history [flags] RELEASE_NAME
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -49,4 +49,4 @@ helm history [flags] RELEASE_NAME
### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -18,7 +18,7 @@ helm home
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -27,4 +27,4 @@ helm home
### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -54,7 +54,7 @@ helm init
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -63,4 +63,4 @@ helm init
### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -32,7 +32,7 @@ helm inspect [CHART]
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -43,4 +43,4 @@ helm inspect [CHART]
* [helm inspect chart](helm_inspect_chart.md) - shows inspect chart
* [helm inspect values](helm_inspect_values.md) - shows inspect values
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -30,7 +30,7 @@ helm inspect chart [CHART]
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -39,4 +39,4 @@ helm inspect chart [CHART]
### SEE ALSO
* [helm inspect](helm_inspect.md) - inspect a chart
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -30,7 +30,7 @@ helm inspect values [CHART]
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -39,4 +39,4 @@ helm inspect values [CHART]
### SEE ALSO
* [helm inspect](helm_inspect.md) - inspect a chart
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -97,7 +97,7 @@ helm install [CHART]
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -106,4 +106,4 @@ helm install [CHART]
### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -28,7 +28,7 @@ helm lint [flags] PATH
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -37,4 +37,4 @@ helm lint [flags] PATH
### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -61,7 +61,7 @@ helm list [flags] [FILTER]
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -70,4 +70,4 @@ helm list [flags] [FILTER]
### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -35,7 +35,7 @@ helm package [flags] [CHART_PATH] [...]
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -44,4 +44,4 @@ helm package [flags] [CHART_PATH] [...]
### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -13,7 +13,7 @@ Manage client-side Helm plugins.
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -26,4 +26,4 @@ Manage client-side Helm plugins.
* [helm plugin remove](helm_plugin_remove.md) - remove one or more Helm plugins
* [helm plugin update](helm_plugin_update.md) - update one or more Helm plugins
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -21,7 +21,7 @@ helm plugin install [options] <path|url>...
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -30,4 +30,4 @@ helm plugin install [options] <path|url>...
### SEE ALSO
* [helm plugin](helm_plugin.md) - add, list, or remove Helm plugins
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -15,7 +15,7 @@ helm plugin list
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -24,4 +24,4 @@ helm plugin list
### SEE ALSO
* [helm plugin](helm_plugin.md) - add, list, or remove Helm plugins
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -15,7 +15,7 @@ helm plugin remove <plugin>...
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -24,4 +24,4 @@ helm plugin remove <plugin>...
### SEE ALSO
* [helm plugin](helm_plugin.md) - add, list, or remove Helm plugins
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -15,7 +15,7 @@ helm plugin update <plugin>...
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -24,4 +24,4 @@ helm plugin update <plugin>...
### SEE ALSO
* [helm plugin](helm_plugin.md) - add, list, or remove Helm plugins
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -17,7 +17,7 @@ Example usage:
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -31,4 +31,4 @@ Example usage:
* [helm repo remove](helm_repo_remove.md) - remove a chart repository
* [helm repo update](helm_repo_update.md) - update information on available charts in the chart repositories
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -24,7 +24,7 @@ helm repo add [flags] [NAME] [URL]
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -33,4 +33,4 @@ helm repo add [flags] [NAME] [URL]
### SEE ALSO
* [helm repo](helm_repo.md) - add, list, remove, update, and index chart repositories
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -31,7 +31,7 @@ helm repo index [flags] [DIR]
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -40,4 +40,4 @@ helm repo index [flags] [DIR]
### SEE ALSO
* [helm repo](helm_repo.md) - add, list, remove, update, and index chart repositories
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -15,7 +15,7 @@ helm repo list [flags]
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -24,4 +24,4 @@ helm repo list [flags]
### SEE ALSO
* [helm repo](helm_repo.md) - add, list, remove, update, and index chart repositories
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -15,7 +15,7 @@ helm repo remove [flags] [NAME]
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -24,4 +24,4 @@ helm repo remove [flags] [NAME]
### SEE ALSO
* [helm repo](helm_repo.md) - add, list, remove, update, and index chart repositories
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -21,7 +21,7 @@ helm repo update
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -30,4 +30,4 @@ helm repo update
### SEE ALSO
* [helm repo](helm_repo.md) - add, list, remove, update, and index chart repositories
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -31,7 +31,7 @@ helm reset
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -40,4 +40,4 @@ helm reset
### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -37,7 +37,7 @@ helm rollback [flags] [RELEASE] [REVISION]
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -46,4 +46,4 @@ helm rollback [flags] [RELEASE] [REVISION]
### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -28,7 +28,7 @@ helm search [keyword]
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -37,4 +37,4 @@ helm search [keyword]
### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -36,7 +36,7 @@ helm serve
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -45,4 +45,4 @@ helm serve
### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -35,7 +35,7 @@ helm status [flags] RELEASE_NAME
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -44,4 +44,4 @@ helm status [flags] RELEASE_NAME
### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -32,7 +32,7 @@ helm test [RELEASE]
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -41,4 +41,4 @@ helm test [RELEASE]
### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -67,7 +67,7 @@ helm upgrade [RELEASE] [CHART]
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -76,4 +76,4 @@ helm upgrade [RELEASE] [CHART]
### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -30,7 +30,7 @@ helm verify [flags] PATH
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -39,4 +39,4 @@ helm verify [flags] PATH
### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -44,7 +44,7 @@ helm version
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
......@@ -53,4 +53,4 @@ helm version
### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 26-May-2017
###### Auto generated by spf13/cobra on 29-May-2017
......@@ -29,7 +29,7 @@ import (
// collectPlugins scans for getter plugins.
// This will load plugins according to the environment.
func collectPlugins(settings environment.EnvSettings) (Providers, error) {
plugins, err := plugin.FindPlugins(settings.PlugDirs)
plugins, err := plugin.FindPlugins(settings.PluginDirs())
if err != nil {
return nil, err
}
......
......@@ -33,7 +33,6 @@ func hh(debug bool) environment.EnvSettings {
hp := helmpath.Home(apath)
return environment.EnvSettings{
Home: hp,
PlugDirs: hp.Plugins(),
Debug: debug,
}
}
......
......@@ -38,20 +38,12 @@ const (
PluginDisableEnvVar = "HELM_NO_PLUGINS"
// HostEnvVar is the HELM_HOST environment variable key.
HostEnvVar = "HELM_HOST"
// DebugEnvVar is the HELM_DEBUG environment variable key.
DebugEnvVar = "HELM_DEBUG"
)
// DefaultHelmHome gets the configured HELM_HOME, or returns the default.
func DefaultHelmHome() string {
if home := os.Getenv(HomeEnvVar); home != "" {
return home
}
return filepath.Join(os.Getenv("HOME"), ".helm")
}
// DefaultHelmHost returns the configured HELM_HOST or an empty string.
func DefaultHelmHost() string {
return os.Getenv(HostEnvVar)
}
// DefaultHelmHome is the default HELM_HOME.
var DefaultHelmHome = filepath.Join("$HOME", ".helm")
// EnvSettings describes all of the environment settings.
type EnvSettings struct {
......@@ -61,8 +53,14 @@ type EnvSettings struct {
TillerNamespace string
// Home is the local path to the Helm home directory.
Home helmpath.Home
// PluginDirs is the path to the plugin directories.
PlugDirs string
// Debug indicates whether or not Helm is running in Debug mode.
Debug bool
}
// PluginDirs is the path to the plugin directories.
func (s EnvSettings) PluginDirs() string {
if d := os.Getenv(PluginEnvVar); d != "" {
return d
}
return s.Home.Plugins()
}
......@@ -17,6 +17,7 @@ package helmpath
import (
"fmt"
"os"
"path/filepath"
)
......@@ -29,12 +30,12 @@ type Home string
//
// Implements fmt.Stringer.
func (h Home) String() string {
return string(h)
return os.ExpandEnv(string(h))
}
// Path returns Home with elements appended.
func (h Home) Path(elem ...string) string {
p := []string{string(h)}
p := []string{h.String()}
p = append(p, elem...)
return filepath.Join(p...)
}
......
......@@ -38,3 +38,9 @@ func TestHelmHome(t *testing.T) {
isEq(t, hh.CacheIndex("t"), "/r/repository/cache/t-index.yaml")
isEq(t, hh.Starters(), "/r/starters")
}
func TestHelmHome_expand(t *testing.T) {
if Home("$HOME").String() == "$HOME" {
t.Error("expected variable expansion")
}
}
......@@ -179,7 +179,7 @@ func SetupPluginEnv(settings helm_env.EnvSettings,
// Set vars that may not have been set, and save client the
// trouble of re-parsing.
helm_env.PluginEnvVar: settings.PlugDirs,
helm_env.PluginEnvVar: settings.PluginDirs(),
helm_env.HomeEnvVar: settings.Home.String(),
// Set vars that convey common information.
......
......@@ -24,7 +24,6 @@ package environment
import (
"io"
"os"
"time"
"k8s.io/helm/pkg/chartutil"
......@@ -44,14 +43,6 @@ const TillerNamespaceEnvVar = "TILLER_NAMESPACE"
// DefaultTillerNamespace is the default namespace for tiller.
const DefaultTillerNamespace = "kube-system"
// GetTillerNamespace returns the right tiller namespace.
func GetTillerNamespace() string {
if ns := os.Getenv(TillerNamespaceEnvVar); ns != "" {
return ns
}
return DefaultTillerNamespace
}
// GoTplEngine is the name of the Go template engine, as registered in the EngineYard.
const GoTplEngine = "gotpl"
......
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