Add KUBECONFIG environment variable for plugin invocation

This also allows an existing variable to be overridden by the
--kubeconfig flag.

Signed-off-by: Janis Meybohm <jayme-github@users.noreply.github.com>
pull/8561/head
Janis Meybohm 5 years ago
parent 657b23f672
commit 3baa4b2b22

@ -197,4 +197,8 @@ func SetupPluginEnv(settings helm_env.EnvSettings,
if settings.Debug { if settings.Debug {
os.Setenv("HELM_DEBUG", "1") os.Setenv("HELM_DEBUG", "1")
} }
if settings.KubeConfig != "" {
os.Setenv("KUBECONFIG", settings.KubeConfig)
}
} }

Loading…
Cancel
Save