diff --git a/state/state.go b/state/state.go index b1e4c7bd..04cccfa7 100644 --- a/state/state.go +++ b/state/state.go @@ -109,6 +109,8 @@ type ReleaseSpec struct { // The 'env' section is not really necessary any longer, as 'set' would now provide the same functionality EnvValues []SetValue `yaml:"env"` + ValuesPathPrefix string `yaml:"valuesPathPrefix"` + // generatedValues are values that need cleaned up on exit generatedValues []string } @@ -1091,7 +1093,8 @@ func (state *HelmState) namespaceAndValuesFlags(helm helmexec.Interface, release for _, value := range release.Values { switch typedValue := value.(type) { case string: - path := state.normalizePath(typedValue) + path := state.normalizePath(release.ValuesPathPrefix + typedValue) + if _, err := os.Stat(path); os.IsNotExist(err) { return nil, err } @@ -1129,7 +1132,7 @@ func (state *HelmState) namespaceAndValuesFlags(helm helmexec.Interface, release } } for _, value := range release.Secrets { - path := state.normalizePath(value) + path := state.normalizePath(release.ValuesPathPrefix + value) if _, err := os.Stat(path); os.IsNotExist(err) { return nil, err }