chart_downloader: add TLS client config to options from repo config. (#7055)

Signed-off-by: Andreas Stenius <andreas.stenius@svenskaspel.se>
(cherry picked from commit d6c13616fa)
pull/7423/head
Andreas Stenius 6 years ago committed by Matt Farina
parent 4e378d346e
commit 9e6f3f5ffb
No known key found for this signature in database
GPG Key ID: 9436E80BFBA46909

@ -214,6 +214,8 @@ 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))
// Next, we need to load the index, and actually look up the chart.
idxFile := filepath.Join(c.RepositoryCache, helmpath.CacheIndexFile(r.Config.Name))
i, err := repo.LoadIndexFile(idxFile)

@ -135,7 +135,7 @@ func TestResolveChartOpts(t *testing.T) {
continue
}
if got != expect {
if *(got.(*getter.HTTPGetter)) != *(expect.(*getter.HTTPGetter)) {
t.Errorf("%s: expected %s, got %s", tt.name, expect, got)
}
}

Loading…
Cancel
Save