Skip to content

Commit aaf8ce9

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 b72cd2e commit aaf8ce9

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
11
resources:
22
- monitor.yaml
3+
4+
# [PROMETHEUS WITH CERTMANAGER] The following patch configures the ServiceMonitor in ../prometheus
5+
# to securely reference certificates created and managed by cert-manager.
6+
# Additionally, ensure that you uncomment the [METRICS WITH CERTMANAGER] patch under config/default/kustomization.yaml
7+
# to mount the "metrics-server-cert" secret in the Manager Deployment.
8+
patches:
9+
- path: patches/monitor_tls_patch.yaml
10+
target:
11+
kind: ServiceMonitor
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Patch for Prometheus ServiceMonitor to enable secure TLS configuration
2+
# using certificates managed by cert-manager
3+
apiVersion: monitoring.coreos.com/v1
4+
kind: ServiceMonitor
5+
metadata:
6+
name: controller-manager-metrics-monitor
7+
namespace: system
8+
spec:
9+
endpoints:
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)