Skip to content

Commit 472ddf7

Browse files
committed
Add prometheus integration with ServiceMonitor CRD
1 parent 11ff3c4 commit 472ddf7

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed

charts/whatsapp-proxy-chart/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type: application
1717
# This is the chart version. This version number should be incremented each time you make changes
1818
# to the chart and its templates, including the app version.
1919
# Versions are expected to follow Semantic Versioning (https://semver.org/)
20-
version: 1.2.0
20+
version: 1.2.1
2121

2222
# This is the version number of the application being deployed. This version number should be
2323
# incremented each time you make changes to the application. Versions are not expected to
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)