| 1 |
{{- if .Values.serviceMonitor.enabled }} |
| 2 |
apiVersion: monitoring.coreos.com/v1 |
| 3 |
kind: ServiceMonitor |
| 4 |
metadata: |
| 5 |
name: {{ include "bird-exporter.fullname" . }} |
| 6 |
spec: |
| 7 |
jobLabel: {{ .Values.serviceMonitor.jobLabel | quote }} |
| 8 |
namespaceSelector: |
| 9 |
matchNames: |
| 10 |
- {{ .Release.Namespace }} |
| 11 |
selector: |
| 12 |
matchLabels: |
| 13 |
{{- include "bird-exporter.labels" . | nindent 6 }} |
| 14 |
endpoints: |
| 15 |
- port: http-metrics |
| 16 |
{{- if .Values.serviceMonitor.metricRelabelings }} |
| 17 |
metricRelabelings: |
| 18 |
{{- toYaml .Values.serviceMonitor.metricRelabelings | nindent 6 }} |
| 19 |
{{- end }} |
| 20 |
{{- if .Values.serviceMonitor.relabelings }} |
| 21 |
relabelings: |
| 22 |
{{- toYaml .Values.serviceMonitor.relabelings | nindent 6 }} |
| 23 |
{{- end }} |
| 24 |
{{- end }} |