Skip to content

Commit 3771ddd

Browse files
committed
Add prometheus integration with ServiceMonitor CRD
1 parent 11ff3c4 commit 3771ddd

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright (c) Meta Platforms, Inc. and affiliates.
2+
#
3+
# License found in the LICENSE file in the root directory
4+
# of this source tree.
5+
{{- if .Values.enableServiceMonitor }}
6+
apiVersion: monitoring.coreos.com/v1
7+
kind: ServiceMonitor
8+
metadata:
9+
name: {{ include "whatsapp-proxy-chart.fullname" . }}-servicemonitor
10+
namespace: default
11+
labels:
12+
release: {{ .Values.prometheus.release }}
13+
spec:
14+
endpoints:
15+
- interval: 30s
16+
path: /metrics
17+
port: stats
18+
namespaceSelector:
19+
matchNames:
20+
- default
21+
selector:
22+
matchLabels:
23+
{{- include "whatsapp-proxy-chart.selectorLabels" . | nindent 6 }}
24+
{{- end }}

charts/whatsapp-proxy-chart/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,8 @@ nodeSelector: {}
102102
tolerations: []
103103

104104
affinity: {}
105+
106+
# Enables service monitor for the prometheus operator.
107+
enableServiceMonitor: false
108+
prometheus:
109+
release: my-prometheus-release

0 commit comments

Comments
 (0)