Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.

Commit

Permalink
Support multiple instances and extra labels for service monitor (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-dyer-sp authored Oct 19, 2020
1 parent 491415f commit c58d967
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/kafka-lag-exporter/templates/060-ServiceMonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ spec:
selector:
matchLabels:
app.kubernetes.io/name: {{ include "kafka-lag-exporter.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
helm.sh/chart: {{ include "kafka-lag-exporter.chart" . }}
namespaceSelector:
matchNames:
Expand All @@ -29,4 +30,7 @@ spec:
{{- if .Values.prometheus.serviceMonitor.scrapeTimeout }}
scrapeTimeout: {{ .Values.prometheus.serviceMonitor.scrapeTimeout }}
{{- end }}
{{- if .Values.prometheus.serviceMonitor.additionalConfig }}
{{ toYaml .Values.prometheus.serviceMonitor.additionalConfig | indent 2}}
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/kafka-lag-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,8 @@ prometheus:
# service monitor label selectors: https://github.com/helm/charts/blob/f5a751f174263971fafd21eee4e35416d6612a3d/stable/prometheus-operator/templates/prometheus/prometheus.yaml#L74
# additionalLabels:
# prometheus: k8s
# additionalConfig:
# targetLabels:
# - prometheus
# - app.kubernetes.io/name

0 comments on commit c58d967

Please sign in to comment.