Skip to content

Commit 5c96fd2

Browse files
committed
refactor: use empty pool rather than failing if system cert load fails
Signed-off-by: Tyler Gillson <[email protected]>
1 parent aafd77f commit 5c96fd2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/sinks/alertmanager.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ func (s *AlertmanagerSink) Configure(c Client, config map[string][]byte) error {
8484
if ok {
8585
caCertPool, err = x509.SystemCertPool()
8686
if err != nil {
87-
return errors.Wrap(err, "invalid Alertmanager config: failed to get system cert pool")
87+
s.log.Error(err, "failed to get system cert pool; using empty pool")
88+
caCertPool = x509.NewCertPool()
8889
}
8990
caCertPool.AppendCertsFromPEM(caCert)
9091
}

0 commit comments

Comments
 (0)