feat: Add go-getter support to load base helmfiles (#1998)

Resolves #1193
This commit is contained in:
Jonas Rutishauser 2021-12-21 01:16:24 +01:00 committed by GitHub
parent 9efb7afb47
commit 1986cb37aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -100,6 +100,14 @@ func (ld *desiredStateLoader) Load(f string, opts LoadOpts) (*state.HelmState, e
}
func (ld *desiredStateLoader) loadFile(inheritedEnv *environment.Environment, baseDir, file string, evaluateBases bool) (*state.HelmState, error) {
path, err := ld.remote.Locate(file)
if err != nil {
return nil, fmt.Errorf("locate: %v", err)
}
if file != path {
ld.logger.Debugf("fetched remote \"%s\" to local cache \"%s\" and loading the latter...", file, path)
}
file = path
return ld.loadFileWithOverrides(inheritedEnv, nil, baseDir, file, evaluateBases)
}