|
|
|
@ -57,6 +57,7 @@ func (r *Resolver) Resolve(reqs []*chart.Dependency, repoNames map[string]string
|
|
|
|
|
// Now we clone the dependencies, locking as we go.
|
|
|
|
|
locked := make([]*chart.Dependency, len(reqs))
|
|
|
|
|
missing := []string{}
|
|
|
|
|
cachedRepoIndex := map[string]*repo.IndexFile{}
|
|
|
|
|
for i, d := range reqs {
|
|
|
|
|
constraint, err := semver.NewConstraint(d.Version)
|
|
|
|
|
if err != nil {
|
|
|
|
@ -123,11 +124,15 @@ func (r *Resolver) Resolve(reqs []*chart.Dependency, repoNames map[string]string
|
|
|
|
|
var ok bool
|
|
|
|
|
found := true
|
|
|
|
|
if !registry.IsOCI(d.Repository) {
|
|
|
|
|
repoIndex, err := repo.LoadIndexFile(filepath.Join(r.cachepath, helmpath.CacheIndexFile(repoName)))
|
|
|
|
|
repoIndex, existence := cachedRepoIndex[repoName]
|
|
|
|
|
if !existence {
|
|
|
|
|
var err error
|
|
|
|
|
repoIndex, err = repo.LoadIndexFile(filepath.Join(r.cachepath, helmpath.CacheIndexFile(repoName)))
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, errors.Wrapf(err, "no cached repository for %s found. (try 'helm repo update')", repoName)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
cachedRepoIndex[repoName] = repoIndex
|
|
|
|
|
}
|
|
|
|
|
vs, ok = repoIndex.Entries[d.Name]
|
|
|
|
|
if !ok {
|
|
|
|
|
return nil, errors.Errorf("%s chart not found in repo %s", d.Name, d.Repository)
|
|
|
|
|