25 lines
724 B
YAML
25 lines
724 B
YAML
|
{{- 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 }}
|
||
|
spec:
|
||
|
endpoints:
|
||
|
- basicAuth:
|
||
|
username:
|
||
|
name: {{ template "kubezero-lib.fullname" $ }}-es-elastic-user
|
||
|
key: username
|
||
|
password:
|
||
|
name: {{ template "kubezero-lib.fullname" $ }}-es-elastic-user
|
||
|
key: elastic
|
||
|
port: http
|
||
|
path: /_prometheus/metrics
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
common.k8s.elastic.co/type: elasticsearch
|
||
|
elasticsearch.k8s.elastic.co/cluster-name: {{ template "kubezero-lib.fullname" $ }}
|
||
|
{{- end }}
|