Skip to content

feat: Add TLS config to the analytics client #15227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Dec 10, 2024
Prev Previous commit
Next Next commit
Only execute block when encessary
  • Loading branch information
DylanGuedes committed Dec 3, 2024
commit 194468d29a1e89919d0cef5f1718d9b04807014c
10 changes: 6 additions & 4 deletions pkg/analytics/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,12 @@ func NewReporter(config Config, kvConfig kv.Config, objectClient client.ObjectCl

originalDefaultTransport := http.DefaultTransport.(*http.Transport)
tr := originalDefaultTransport.Clone()
var err error
tr.TLSClientConfig, err = config.TLSConfig.GetTLSConfig()
if err != nil {
return nil, err
if config.TLSConfig.CertPath != "" || config.TLSConfig.KeyPath != "" {
var err error
tr.TLSClientConfig, err = config.TLSConfig.GetTLSConfig()
if err != nil {
return nil, err
}
}
r := &Reporter{
logger: logger,
Expand Down
Loading