Skip to content

Commit ba3351f

Browse files
authored
Add optional ServiceMonitor for HAProxy Prometheus metrics (v1.3.6) (#530)
1 parent 7889b7d commit ba3351f

3 files changed

Lines changed: 29 additions & 1 deletion

File tree

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.3.5
20+
version: 1.3.6
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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ extraVolumes: []
110110
# Extra volumeMounts for the HAProxy container.
111111
extraVolumeMounts: []
112112

113+
enableServiceMonitor: false
114+
prometheus:
115+
release: my-prometheus-release
116+
113117
# HAProxy tunables. These are interpolated into haproxyConfig below via `tpl`,
114118
# so individual values (e.g. maxconn) can be overridden per-deployment without
115119
# replacing the entire config blob.

0 commit comments

Comments
 (0)