|
|
|
@ -30,12 +30,17 @@ import (
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
// HomeEnvVar is the HELM_HOME environment variable key.
|
|
|
|
|
HomeEnvVar = "HELM_HOME"
|
|
|
|
|
// PluginEnvVar is the HELM_PLUGIN environment variable key.
|
|
|
|
|
PluginEnvVar = "HELM_PLUGIN"
|
|
|
|
|
// PluginDisableEnvVar is the HELM_NO_PLUGINS environment variable key.
|
|
|
|
|
PluginDisableEnvVar = "HELM_NO_PLUGINS"
|
|
|
|
|
// HostEnvVar is the HELM_HOST environment variable key.
|
|
|
|
|
HostEnvVar = "HELM_HOST"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// DefaultHelmHome gets the configured HELM_HOME, or returns the default.
|
|
|
|
|
func DefaultHelmHome() string {
|
|
|
|
|
if home := os.Getenv(HomeEnvVar); home != "" {
|
|
|
|
|
return home
|
|
|
|
@ -43,14 +48,21 @@ func DefaultHelmHome() string {
|
|
|
|
|
return filepath.Join(os.Getenv("HOME"), ".helm")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// DefaultHelmHost returns the configured HELM_HOST or an empty string.
|
|
|
|
|
func DefaultHelmHost() string {
|
|
|
|
|
return os.Getenv(HostEnvVar)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// EnvSettings describes all of the environment settings.
|
|
|
|
|
type EnvSettings struct {
|
|
|
|
|
// TillerHost is the host and port of Tiller.
|
|
|
|
|
TillerHost string
|
|
|
|
|
// TillerNamespace is the namespace in which Tiller runs.
|
|
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|