Skip to content

Commit a057a26

Browse files
authored
Add prometheus tls example (#539)
* Add prom tls example
1 parent 6d2c66a commit a057a26

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

docs/examples/prometheus/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,9 @@ kubectl apply -f rabbitmq-podmonitor.yaml
99

1010
Alternatively, if you deployed the Prometheus Operator via the [kube-prometheus-stack](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack) Helm chart,
1111
set the values in [kube-prometheus-stack-values.yaml.example](kube-prometheus-stack-values.yaml.example) when installing / upgrading the Helm chart.
12+
13+
---
14+
## TLS Endpoints
15+
16+
With `TLS` enabled you should use `-tls` files to deploy the secure prometheus endpoints.
17+
_Note_: The standard Prometheus (15692) port is disabled with the option `disableNonTLSListeners=true`.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
prometheus:
3+
additionalPodMonitors:
4+
- name: rabbitmq
5+
podMetricsEndpoints:
6+
- port: prometheus-tls
7+
scheme: https
8+
tlsConfig:
9+
insecureSkipVerify: true
10+
selector:
11+
matchLabels:
12+
app.kubernetes.io/component: rabbitmq
13+
namespaceSelector:
14+
any: true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
apiVersion: monitoring.coreos.com/v1
3+
kind: PodMonitor
4+
metadata:
5+
name: rabbitmq
6+
spec:
7+
podMetricsEndpoints:
8+
- interval: 15s
9+
scheme: https
10+
port: prometheus-tls
11+
selector:
12+
matchLabels:
13+
app.kubernetes.io/component: rabbitmq
14+
namespaceSelector:
15+
any: true

0 commit comments

Comments
 (0)