diff --git a/internal/sinks/alertmanager.go b/internal/sinks/alertmanager.go index 439989e4..53f2cf5f 100644 --- a/internal/sinks/alertmanager.go +++ b/internal/sinks/alertmanager.go @@ -84,7 +84,8 @@ func (s *AlertmanagerSink) Configure(c Client, config map[string][]byte) error { if ok { caCertPool, err = x509.SystemCertPool() if err != nil { - return errors.Wrap(err, "invalid Alertmanager config: failed to get system cert pool") + s.log.Error(err, "failed to get system cert pool; using empty pool") + caCertPool = x509.NewCertPool() } caCertPool.AppendCertsFromPEM(caCert) } diff --git a/internal/sinks/sink.go b/internal/sinks/sink.go index 347212ec..65a61988 100644 --- a/internal/sinks/sink.go +++ b/internal/sinks/sink.go @@ -40,9 +40,8 @@ type Client struct { // NewClient returns a new Client with the provided timeout. func NewClient(timeout time.Duration) *Client { - client := &http.Client{ - Timeout: timeout, - } + client := http.DefaultClient // inherit http.ProxyFromEnvironment + client.Timeout = timeout return &Client{ hclient: client, }