mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-17 18:25:26 +00:00
HelmChartInflationGenerator: inherit environment variables to helm command
This commit is contained in:
committed by
Jan-Otto Kröpke
parent
9e8e7a7fe9
commit
a5e6295923
@@ -76,7 +76,7 @@ func (p *HelmChartInflationGeneratorPlugin) Config(h *resmap.PluginHelpers, conf
|
||||
cmd := exec.Command(p.HelmBin, args...)
|
||||
cmd.Stdout = stdout
|
||||
cmd.Stderr = stderr
|
||||
cmd.Env = append(cmd.Env,
|
||||
cmd.Env = append(os.Environ(),
|
||||
fmt.Sprintf("HELM_CONFIG_HOME=%s", p.HelmHome),
|
||||
fmt.Sprintf("HELM_CACHE_HOME=%s/.cache", p.HelmHome),
|
||||
fmt.Sprintf("HELM_DATA_HOME=%s/.data", p.HelmHome),
|
||||
|
||||
@@ -84,7 +84,7 @@ func (p *HelmChartInflationGeneratorPlugin) Config(h *resmap.PluginHelpers, conf
|
||||
cmd := exec.Command(p.HelmBin, args...)
|
||||
cmd.Stdout = stdout
|
||||
cmd.Stderr = stderr
|
||||
cmd.Env = append(cmd.Env,
|
||||
cmd.Env = append(os.Environ(),
|
||||
fmt.Sprintf("HELM_CONFIG_HOME=%s", p.HelmHome),
|
||||
fmt.Sprintf("HELM_CACHE_HOME=%s/.cache", p.HelmHome),
|
||||
fmt.Sprintf("HELM_DATA_HOME=%s/.data", p.HelmHome),
|
||||
|
||||
@@ -12,6 +12,8 @@ import (
|
||||
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
|
||||
)
|
||||
|
||||
//add tests for https://github.com/kubernetes-sigs/kustomize/pull/3713 if you plan to re-enable tests
|
||||
|
||||
func TestHelmChartInflationGenerator(t *testing.T) {
|
||||
th := kusttest_test.MakeEnhancedHarness(t).
|
||||
PrepBuiltin("HelmChartInflationGenerator")
|
||||
|
||||
Reference in New Issue
Block a user