2020-08-13 18:44:50 +00:00
|
|
|
{{- if .Values.es.prometheus }}
|
|
|
|
apiVersion: monitoring.coreos.com/v1
|
|
|
|
kind: ServiceMonitor
|
|
|
|
metadata:
|
|
|
|
name: {{ template "kubezero-lib.fullname" . }}-es
|
|
|
|
namespace: {{ .Release.Namespace }}
|
|
|
|
labels:
|
|
|
|
{{ include "kubezero-lib.labels" . | indent 4 }}
|
2020-08-15 13:33:41 +00:00
|
|
|
release: metrics
|
2020-08-13 18:44:50 +00:00
|
|
|
spec:
|
|
|
|
endpoints:
|
|
|
|
- basicAuth:
|
2020-08-26 21:50:51 +00:00
|
|
|
username: elastic
|
2020-08-13 18:44:50 +00:00
|
|
|
password:
|
|
|
|
name: {{ template "kubezero-lib.fullname" $ }}-es-elastic-user
|
|
|
|
key: elastic
|
|
|
|
port: http
|
|
|
|
path: /_prometheus/metrics
|
|
|
|
selector:
|
2020-08-15 13:45:43 +00:00
|
|
|
matchExpressions:
|
2020-08-15 13:49:30 +00:00
|
|
|
- key: elasticsearch.k8s.elastic.co/statefulset-name
|
2020-08-15 13:45:43 +00:00
|
|
|
operator: DoesNotExist
|
2020-08-13 18:44:50 +00:00
|
|
|
matchLabels:
|
|
|
|
common.k8s.elastic.co/type: elasticsearch
|
|
|
|
elasticsearch.k8s.elastic.co/cluster-name: {{ template "kubezero-lib.fullname" $ }}
|
|
|
|
{{- end }}
|