Skip to content

Commit f76a21b

Browse files
Add an option to enable Prometheus with real certificates
While the install scripts do not enable Prometheus integration by default, solutions running upstream may want to use and enable it with Prometheus. This addition offers a way for upstream users to understand how to properly configure Prometheus using real certificates. At the very least, it serves as documentation and provides an option for those installing from source who want to implement secure Prometheus integration.
1 parent 6c480ea commit f76a21b

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed
Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1-
# Prometheus Monitor Service (Metrics)
1+
# Patch for Prometheus ServiceMonitor to enable secure TLS configuration
2+
# using certificates managed by cert-manager
23
apiVersion: monitoring.coreos.com/v1
34
kind: ServiceMonitor
45
metadata:
5-
labels:
6-
control-plane: operator-controller-controller-manager
76
name: controller-manager-metrics-monitor
87
namespace: system
98
spec:
109
endpoints:
11-
- path: /metrics
12-
port: https
13-
scheme: https
14-
bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
15-
tlsConfig:
16-
insecureSkipVerify: true
17-
selector:
18-
matchLabels:
19-
control-plane: operator-controller-controller-manager
10+
- tlsConfig:
11+
insecureSkipVerify: false
12+
ca:
13+
secret:
14+
name: olmv1-ca
15+
key: ca.crt
16+
cert:
17+
secret:
18+
name: olmv1-ca
19+
key: olm-ca.crt
20+
keySecret:
21+
name: olmv1-ca
22+
key: ca.crt

0 commit comments

Comments
 (0)