Skip to content

Commit 7e22db8

Browse files
add option to enable prometheus with real certs
1 parent 325c0ba commit 7e22db8

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)