Skip to content

Commit bc10341

Browse files
committed
ESO-155: Updates metrics server TLS opts to also use system CA certs
Signed-off-by: Bharath B <[email protected]>
1 parent 94f8165 commit bc10341

File tree

1 file changed

+5
-1
lines changed
  • cmd/external-secrets-operator

1 file changed

+5
-1
lines changed

cmd/external-secrets-operator/main.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,11 @@ func main() {
154154
metricsServerOptions.KeyName = metricsKeyFileName
155155
}
156156
metricsTLSOpts = append(metricsTLSOpts, func(c *tls.Config) {
157-
certPool := x509.NewCertPool()
157+
certPool, err := x509.SystemCertPool()
158+
if err != nil {
159+
setupLog.Info("unable to load system certificate pool", "error", err)
160+
certPool = x509.NewCertPool()
161+
}
158162
openshiftCACert, err := os.ReadFile(openshiftCACertificateFile)
159163
if err != nil {
160164
setupLog.Error(err, "failed to read OpenShift CA certificate")

0 commit comments

Comments
 (0)