|
|
@ -82,7 +82,7 @@ func New() *EnvSettings {
|
|
|
|
KubeAsGroups: envCSV("HELM_KUBEASGROUPS"),
|
|
|
|
KubeAsGroups: envCSV("HELM_KUBEASGROUPS"),
|
|
|
|
KubeAPIServer: os.Getenv("HELM_KUBEAPISERVER"),
|
|
|
|
KubeAPIServer: os.Getenv("HELM_KUBEAPISERVER"),
|
|
|
|
KubeCaFile: os.Getenv("HELM_KUBECAFILE"),
|
|
|
|
KubeCaFile: os.Getenv("HELM_KUBECAFILE"),
|
|
|
|
ClientSecCertDirectory: envOr("HELM_SECONDARY_CERT_DIR", ""),
|
|
|
|
ClientSecCertDirectory: envOr("HELM_CLIENT_TLS_CERT_DIR", ""),
|
|
|
|
PluginsDirectory: envOr("HELM_PLUGINS", helmpath.DataPath("plugins")),
|
|
|
|
PluginsDirectory: envOr("HELM_PLUGINS", helmpath.DataPath("plugins")),
|
|
|
|
RegistryConfig: envOr("HELM_REGISTRY_CONFIG", helmpath.ConfigPath("registry/config.json")),
|
|
|
|
RegistryConfig: envOr("HELM_REGISTRY_CONFIG", helmpath.ConfigPath("registry/config.json")),
|
|
|
|
RepositoryConfig: envOr("HELM_REPOSITORY_CONFIG", helmpath.ConfigPath("repositories.yaml")),
|
|
|
|
RepositoryConfig: envOr("HELM_REPOSITORY_CONFIG", helmpath.ConfigPath("repositories.yaml")),
|
|
|
@ -150,18 +150,18 @@ func envCSV(name string) (ls []string) {
|
|
|
|
|
|
|
|
|
|
|
|
func (s *EnvSettings) EnvVars() map[string]string {
|
|
|
|
func (s *EnvSettings) EnvVars() map[string]string {
|
|
|
|
envvars := map[string]string{
|
|
|
|
envvars := map[string]string{
|
|
|
|
"HELM_BIN": os.Args[0],
|
|
|
|
"HELM_BIN": os.Args[0],
|
|
|
|
"HELM_CACHE_HOME": helmpath.CachePath(""),
|
|
|
|
"HELM_CACHE_HOME": helmpath.CachePath(""),
|
|
|
|
"HELM_CONFIG_HOME": helmpath.ConfigPath(""),
|
|
|
|
"HELM_CONFIG_HOME": helmpath.ConfigPath(""),
|
|
|
|
"HELM_DATA_HOME": helmpath.DataPath(""),
|
|
|
|
"HELM_DATA_HOME": helmpath.DataPath(""),
|
|
|
|
"HELM_DEBUG": fmt.Sprint(s.Debug),
|
|
|
|
"HELM_DEBUG": fmt.Sprint(s.Debug),
|
|
|
|
"HELM_PLUGINS": s.PluginsDirectory,
|
|
|
|
"HELM_PLUGINS": s.PluginsDirectory,
|
|
|
|
"HELM_REGISTRY_CONFIG": s.RegistryConfig,
|
|
|
|
"HELM_REGISTRY_CONFIG": s.RegistryConfig,
|
|
|
|
"HELM_REPOSITORY_CACHE": s.RepositoryCache,
|
|
|
|
"HELM_REPOSITORY_CACHE": s.RepositoryCache,
|
|
|
|
"HELM_REPOSITORY_CONFIG": s.RepositoryConfig,
|
|
|
|
"HELM_REPOSITORY_CONFIG": s.RepositoryConfig,
|
|
|
|
"HELM_NAMESPACE": s.Namespace(),
|
|
|
|
"HELM_NAMESPACE": s.Namespace(),
|
|
|
|
"HELM_MAX_HISTORY": strconv.Itoa(s.MaxHistory),
|
|
|
|
"HELM_MAX_HISTORY": strconv.Itoa(s.MaxHistory),
|
|
|
|
"HELM_SECONDARY_CERT_DIR": s.ClientSecCertDirectory,
|
|
|
|
"HELM_CLIENT_TLS_CERT_DIR": s.ClientSecCertDirectory,
|
|
|
|
|
|
|
|
|
|
|
|
// broken, these are populated from helm flags and not kubeconfig.
|
|
|
|
// broken, these are populated from helm flags and not kubeconfig.
|
|
|
|
"HELM_KUBECONTEXT": s.KubeContext,
|
|
|
|
"HELM_KUBECONTEXT": s.KubeContext,
|
|
|
|