Upgrade dependent version: helm.sh/helm/v3 v3.9.0 -> v3.10.3 (#5420)
Signed-off-by: hongzhouzi <hongzhouzi@kubesphere.io> Signed-off-by: hongzhouzi <hongzhouzi@kubesphere.io>
This commit is contained in:
4
vendor/helm.sh/helm/v3/pkg/repo/chartrepo.go
vendored
4
vendor/helm.sh/helm/v3/pkg/repo/chartrepo.go
vendored
@@ -253,6 +253,10 @@ func FindChartInAuthAndTLSAndPassRepoURL(repoURL, username, password, chartName,
|
||||
if err != nil {
|
||||
return "", errors.Wrapf(err, "looks like %q is not a valid chart repository or cannot be reached", repoURL)
|
||||
}
|
||||
defer func() {
|
||||
os.RemoveAll(filepath.Join(r.CachePath, helmpath.CacheChartsFile(r.Config.Name)))
|
||||
os.RemoveAll(filepath.Join(r.CachePath, helmpath.CacheIndexFile(r.Config.Name)))
|
||||
}()
|
||||
|
||||
// Read the index file for the repository to get chart information and return chart URL
|
||||
repoIndex, err := LoadIndexFile(idx)
|
||||
|
||||
8
vendor/helm.sh/helm/v3/pkg/repo/index.go
vendored
8
vendor/helm.sh/helm/v3/pkg/repo/index.go
vendored
@@ -118,6 +118,10 @@ func LoadIndexFile(path string) (*IndexFile, error) {
|
||||
// MustAdd adds a file to the index
|
||||
// This can leave the index in an unsorted state
|
||||
func (i IndexFile) MustAdd(md *chart.Metadata, filename, baseURL, digest string) error {
|
||||
if i.Entries == nil {
|
||||
return errors.New("entries not initialized")
|
||||
}
|
||||
|
||||
if md.APIVersion == "" {
|
||||
md.APIVersion = chart.APIVersionV1
|
||||
}
|
||||
@@ -339,6 +343,10 @@ func loadIndex(data []byte, source string) (*IndexFile, error) {
|
||||
|
||||
for name, cvs := range i.Entries {
|
||||
for idx := len(cvs) - 1; idx >= 0; idx-- {
|
||||
if cvs[idx] == nil {
|
||||
log.Printf("skipping loading invalid entry for chart %q from %s: empty entry", name, source)
|
||||
continue
|
||||
}
|
||||
if cvs[idx].APIVersion == "" {
|
||||
cvs[idx].APIVersion = chart.APIVersionV1
|
||||
}
|
||||
|
||||
3
vendor/helm.sh/helm/v3/pkg/repo/repo.go
vendored
3
vendor/helm.sh/helm/v3/pkg/repo/repo.go
vendored
@@ -100,6 +100,9 @@ func (r *File) Remove(name string) bool {
|
||||
cp := []*Entry{}
|
||||
found := false
|
||||
for _, rf := range r.Repositories {
|
||||
if rf == nil {
|
||||
continue
|
||||
}
|
||||
if rf.Name == name {
|
||||
found = true
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user