aboutsummaryrefslogtreecommitdiff
path: root/script/helm/garage/templates/service.yaml
diff options
context:
space:
mode:
authorPatrick Jahns <github@patrickjahns.de>2022-11-17 23:33:00 +0100
committerMaximilien Richer <me@mricher.fr>2023-01-27 00:08:33 +0100
commitb999bb36af59de899c2426c0ad35e4e04abc317d (patch)
treed08ab873424b61bf066ce8cf878104c88093d6fd /script/helm/garage/templates/service.yaml
parentd20e8c92564843e8c9abdf573db5ce7f6c58f482 (diff)
downloadgarage-b999bb36af59de899c2426c0ad35e4e04abc317d.tar.gz
garage-b999bb36af59de899c2426c0ad35e4e04abc317d.zip
feat(helm): ability to monitor garage via prometheus
Diffstat (limited to 'script/helm/garage/templates/service.yaml')
-rw-r--r--script/helm/garage/templates/service.yaml21
1 files changed, 21 insertions, 0 deletions
diff --git a/script/helm/garage/templates/service.yaml b/script/helm/garage/templates/service.yaml
index 2bfff99d..37218872 100644
--- a/script/helm/garage/templates/service.yaml
+++ b/script/helm/garage/templates/service.yaml
@@ -17,3 +17,24 @@ spec:
name: s3-web
selector:
{{- include "garage.selectorLabels" . | nindent 4 }}
+{{- if .Values.monitoring.metrics.enabled }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "garage.fullname" . }}-metrics
+ labels:
+ {{- include "garage.labels" . | nindent 4 }}
+ annotations:
+ prometheus.io/scrape: "true"
+spec:
+ type: ClusterIP
+ clusterIP: None
+ ports:
+ - port: 3903
+ targetPort: 3903
+ protocol: TCP
+ name: metrics
+ selector:
+ {{- include "garage.selectorLabels" . | nindent 4 }}
+{{- end }} \ No newline at end of file