mirror of
https://github.com/helm/helm.git
synced 2026-05-28 04:35:48 -04:00
v3: Propagate --kube-context, --kubeconfig and --namespace values to plugins
Closes #6631 Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
This commit is contained in:
parent
1da0d011f9
commit
69adc5a218
1 changed files with 9 additions and 1 deletions
|
|
@ -84,12 +84,20 @@ 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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue