Merge pull request #6632 from mumoshu/add-plugin-envvars

v3: Propagate --kube-context, --kubeconfig and --namespace values to plugins
pull/6652/head
Matthew Fisher 5 years ago committed by GitHub
commit ed90425ebb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -88,14 +88,22 @@ func envOr(name, def string) string {
}
func (s *EnvSettings) EnvVars() map[string]string {
return map[string]string{
envvars := map[string]string{
"HELM_BIN": os.Args[0],
"HELM_DEBUG": fmt.Sprint(s.Debug),
"HELM_PLUGINS": s.PluginsDirectory,
"HELM_REGISTRY_CONFIG": s.RegistryConfig,
"HELM_REPOSITORY_CACHE": s.RepositoryCache,
"HELM_REPOSITORY_CONFIG": s.RepositoryConfig,
"HELM_NAMESPACE": s.Namespace,
"HELM_KUBECONTEXT": s.KubeContext,
}
if s.KubeConfig != "" {
envvars["KUBECONFIG"] = s.KubeConfig
}
return envvars
}
//Namespace gets the namespace from the configuration

Loading…
Cancel
Save