|
|
@ -310,7 +310,7 @@ func (m *Manager) downloadAll(deps []*chart.Dependency) error {
|
|
|
|
|
|
|
|
|
|
|
|
// Any failure to resolve/download a chart should fail:
|
|
|
|
// Any failure to resolve/download a chart should fail:
|
|
|
|
// https://github.com/helm/helm/issues/1439
|
|
|
|
// https://github.com/helm/helm/issues/1439
|
|
|
|
churl, username, password, err := m.findChartURL(dep.Name, dep.Version, dep.Repository, repos)
|
|
|
|
churl, username, password, insecureskiptlsverify, err := m.findChartURL(dep.Name, dep.Version, dep.Repository, repos)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
saveError = errors.Wrapf(err, "could not find %s", churl)
|
|
|
|
saveError = errors.Wrapf(err, "could not find %s", churl)
|
|
|
|
break
|
|
|
|
break
|
|
|
@ -332,6 +332,7 @@ func (m *Manager) downloadAll(deps []*chart.Dependency) error {
|
|
|
|
Getters: m.Getters,
|
|
|
|
Getters: m.Getters,
|
|
|
|
Options: []getter.Option{
|
|
|
|
Options: []getter.Option{
|
|
|
|
getter.WithBasicAuth(username, password),
|
|
|
|
getter.WithBasicAuth(username, password),
|
|
|
|
|
|
|
|
getter.WithInsecureSkipVerifyTLS(insecureskiptlsverify),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -685,9 +686,9 @@ func (m *Manager) parallelRepoUpdate(repos []*repo.Entry) error {
|
|
|
|
// repoURL is the repository to search
|
|
|
|
// repoURL is the repository to search
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// If it finds a URL that is "relative", it will prepend the repoURL.
|
|
|
|
// If it finds a URL that is "relative", it will prepend the repoURL.
|
|
|
|
func (m *Manager) findChartURL(name, version, repoURL string, repos map[string]*repo.ChartRepository) (url, username, password string, err error) {
|
|
|
|
func (m *Manager) findChartURL(name, version, repoURL string, repos map[string]*repo.ChartRepository) (url, username, password string, insecureskiptlsverify bool, err error) {
|
|
|
|
if strings.HasPrefix(repoURL, "oci://") {
|
|
|
|
if strings.HasPrefix(repoURL, "oci://") {
|
|
|
|
return fmt.Sprintf("%s/%s:%s", repoURL, name, version), "", "", nil
|
|
|
|
return fmt.Sprintf("%s/%s:%s", repoURL, name, version), "", "", false, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for _, cr := range repos {
|
|
|
|
for _, cr := range repos {
|
|
|
@ -709,15 +710,16 @@ func (m *Manager) findChartURL(name, version, repoURL string, repos map[string]*
|
|
|
|
}
|
|
|
|
}
|
|
|
|
username = cr.Config.Username
|
|
|
|
username = cr.Config.Username
|
|
|
|
password = cr.Config.Password
|
|
|
|
password = cr.Config.Password
|
|
|
|
|
|
|
|
insecureskiptlsverify = cr.Config.InsecureSkipTLSverify
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
url, err = repo.FindChartInRepoURL(repoURL, name, version, "", "", "", m.Getters)
|
|
|
|
url, err = repo.FindChartInRepoURL(repoURL, name, version, "", "", "", m.Getters)
|
|
|
|
if err == nil {
|
|
|
|
if err == nil {
|
|
|
|
return url, username, password, err
|
|
|
|
return url, username, password, false, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
err = errors.Errorf("chart %s not found in %s: %s", name, repoURL, err)
|
|
|
|
err = errors.Errorf("chart %s not found in %s: %s", name, repoURL, err)
|
|
|
|
return url, username, password, err
|
|
|
|
return url, username, password, false, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// findEntryByName finds an entry in the chart repository whose name matches the given name.
|
|
|
|
// findEntryByName finds an entry in the chart repository whose name matches the given name.
|
|
|
|