KubeZero/charts/kubezero-logging/templates/eck/servicemonitor.yaml

27 lines
768 B
YAML
Raw Normal View History

{{- 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
spec:
endpoints:
- basicAuth:
2020-08-26 21:50:51 +00:00
username: elastic
password:
name: {{ template "kubezero-lib.fullname" $ }}-es-elastic-user
key: elastic
port: http
path: /_prometheus/metrics
selector:
matchExpressions:
- key: elasticsearch.k8s.elastic.co/statefulset-name
operator: DoesNotExist
matchLabels:
common.k8s.elastic.co/type: elasticsearch
elasticsearch.k8s.elastic.co/cluster-name: {{ template "kubezero-lib.fullname" $ }}
{{- end }}