From b999bb36af59de899c2426c0ad35e4e04abc317d Mon Sep 17 00:00:00 2001 From: Patrick Jahns Date: Thu, 17 Nov 2022 23:33:00 +0100 Subject: feat(helm): ability to monitor garage via prometheus --- script/helm/garage/templates/service.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'script/helm/garage/templates/service.yaml') 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 -- cgit v1.2.3