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

Signed-off-by: Andreas Stenius <andreas.stenius@svenskaspel.se>
pull/7071/head
Andreas Stenius 5 years ago
parent d3ad6f9c78
commit 0f0aa6b432
No known key found for this signature in database
GPG Key ID: D2A6F15EE8C2A5CC

@ -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