chart_downloader: avoid overriding TLS options from command flags when not setup in repo config.

Signed-off-by: Andreas Stenius <andreas.stenius@svenskaspel.se>
(cherry picked from commit 0f0aa6b432)
pull/7423/head
Andreas Stenius 5 years ago committed by Matt Farina
parent 7d006ba8c7
commit e1459ac580
No known key found for this signature in database
GPG Key ID: 9436E80BFBA46909

@ -214,7 +214,9 @@ func (c *ChartDownloader) ResolveChartVersion(ref, version string) (*url.URL, er
c.Options = append(c.Options, getter.WithBasicAuth(r.Config.Username, r.Config.Password))
}
c.Options = append(c.Options, getter.WithTLSClientConfig(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))
}
// Next, we need to load the index, and actually look up the chart.
idxFile := filepath.Join(c.RepositoryCache, helmpath.CacheIndexFile(r.Config.Name))

Loading…
Cancel
Save