Skip to content
This repository was archived by the owner on Apr 2, 2024. It is now read-only.

Commit a72f7f4

Browse files
authored
Added Prometheus annotations to Helm chart (#66)
Annotations predefined by the Prometheus Helm chart (https://hub.helm.sh/charts/stable/prometheus) are needed in the pod annotations so that the Prometheus service discovery works properly with the connector and scrapes up its metrics endpoint.
1 parent 43ecfd8 commit a72f7f4

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

helm-chart/templates/deployment-connector.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ spec:
1616
metadata:
1717
labels:
1818
app: {{ template "connector.fullname" . }}
19+
{{ if .Values.prometheus.enabled }}
20+
annotations: {{ .Values.prometheus.annotations | toYaml | nindent 8 }}
21+
{{ end }}
1922
spec:
2023
containers:
2124
- image: {{ .Values.image }}

helm-chart/values.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@ connection:
2525
# must be created before start
2626
dbName: timescale
2727

28+
# Prometheus annotations to configure scraping metrics from the connector
29+
prometheus:
30+
enabled: true
31+
# Using the predefined annotations from the Prometheus helm chart:
32+
# https://hub.helm.sh/charts/stable/prometheus
33+
annotations:
34+
prometheus.io/scrape: 'true'
35+
prometheus.io/port: '9201'
36+
prometheus.io/path: '/metrics'
37+
2838

2939
# settings for the service to be created that will expose
3040
# the timescale-prometheus deployment
@@ -52,4 +62,4 @@ dropChunk:
5262
# set your own limits
5363
resources: {}
5464
# https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
55-
nodeSelector: {}
65+
nodeSelector: {}

0 commit comments

Comments
 (0)