|
|
@ -181,8 +181,10 @@ func (c *ChartDownloader) ResolveChartVersion(ref, version string) (*url.URL, er
|
|
|
|
c.Options = append(
|
|
|
|
c.Options = append(
|
|
|
|
c.Options,
|
|
|
|
c.Options,
|
|
|
|
getter.WithURL(rc.URL),
|
|
|
|
getter.WithURL(rc.URL),
|
|
|
|
getter.WithTLSClientConfig(rc.CertFile, rc.KeyFile, rc.CAFile),
|
|
|
|
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
if rc.CertFile != "" || rc.KeyFile != "" || rc.CAFile != "" {
|
|
|
|
|
|
|
|
c.Options = append(c.Options, getter.WithTLSClientConfig(rc.CertFile, rc.KeyFile, rc.CAFile))
|
|
|
|
|
|
|
|
}
|
|
|
|
if rc.Username != "" && rc.Password != "" {
|
|
|
|
if rc.Username != "" && rc.Password != "" {
|
|
|
|
c.Options = append(
|
|
|
|
c.Options = append(
|
|
|
|
c.Options,
|
|
|
|
c.Options,
|
|
|
@ -210,13 +212,15 @@ func (c *ChartDownloader) ResolveChartVersion(ref, version string) (*url.URL, er
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return u, err
|
|
|
|
return u, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if r != nil && r.Config != nil && r.Config.Username != "" && r.Config.Password != "" {
|
|
|
|
|
|
|
|
c.Options = append(c.Options, getter.WithBasicAuth(r.Config.Username, r.Config.Password))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if r != nil && r.Config != nil {
|
|
|
|
if r.Config.CertFile != "" || r.Config.KeyFile != "" || r.Config.CAFile != "" {
|
|
|
|
if r.Config.CertFile != "" || r.Config.KeyFile != "" || r.Config.CAFile != "" {
|
|
|
|
c.Options = append(c.Options, getter.WithTLSClientConfig(r.Config.CertFile, r.Config.KeyFile, r.Config.CAFile))
|
|
|
|
c.Options = append(c.Options, getter.WithTLSClientConfig(r.Config.CertFile, r.Config.KeyFile, r.Config.CAFile))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if r.Config.Username != "" && r.Config.Password != "" {
|
|
|
|
|
|
|
|
c.Options = append(c.Options, getter.WithBasicAuth(r.Config.Username, r.Config.Password))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Next, we need to load the index, and actually look up the chart.
|
|
|
|
// Next, we need to load the index, and actually look up the chart.
|
|
|
|
idxFile := filepath.Join(c.RepositoryCache, helmpath.CacheIndexFile(r.Config.Name))
|
|
|
|
idxFile := filepath.Join(c.RepositoryCache, helmpath.CacheIndexFile(r.Config.Name))
|
|
|
@ -255,9 +259,6 @@ func (c *ChartDownloader) ResolveChartVersion(ref, version string) (*url.URL, er
|
|
|
|
if _, err := getter.NewHTTPGetter(getter.WithURL(rc.URL)); err != nil {
|
|
|
|
if _, err := getter.NewHTTPGetter(getter.WithURL(rc.URL)); err != nil {
|
|
|
|
return repoURL, err
|
|
|
|
return repoURL, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if r != nil && r.Config != nil && r.Config.Username != "" && r.Config.Password != "" {
|
|
|
|
|
|
|
|
c.Options = append(c.Options, getter.WithBasicAuth(r.Config.Username, r.Config.Password))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return u, err
|
|
|
|
return u, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|