123456789101112131415161718192021222324252627282930 |
- {{- if .Values.serviceMonitor.enabled }}
- ---
- apiVersion: monitoring.coreos.com/v1
- kind: ServiceMonitor
- metadata:
- name: {{ template "elasticsearch-exporter.fullname" . }}
- labels:
- chart: {{ template "elasticsearch-exporter.chart" . }}
- k8s-app: {{ template "elasticsearch-exporter.name" . }}
- release: "{{ .Release.Name }}"
- heritage: "{{ .Release.Service }}"
- {{- if .Values.serviceMonitor.labels }}
- {{- toYaml .Values.serviceMonitor.labels | nindent 4 }}
- {{- end }}
- spec:
- endpoints:
- - interval: 10s
- honorLabels: true
- port: http
- path: {{ .Values.web.path }}
- scheme: http
- jobLabel: "{{ .Release.Name }}"
- selector:
- matchLabels:
- k8s-app: {{ template "elasticsearch-exporter.name" . }}
- release: "{{ .Release.Name }}"
- namespaceSelector:
- matchNames:
- - {{ .Release.Namespace }}
- {{- end }}
|