apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: es-{{ .Values.name }} namespace: {{ .Release.Namespace }} spec: endpoints: - basicAuth: username: name: {{ .Values.name }}-es-elastic-user key: username password: name: {{ .Values.name }}-es-elastic-user key: elastic port: http path: /_prometheus/metrics selector: matchLabels: common.k8s.elastic.co/type: elasticsearch elasticsearch.k8s.elastic.co/cluster-name: {{ .Values.name }}