apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  labels:
    release: self-monitoring
  name: {{ include "diagnosis-query.fullname" . }}-monitor
  namespace: self-monitoring
spec:
  endpoints:
    - path: /metrics
      targetPort: {{ .Values.service.targetPort }}
  namespaceSelector:
    matchNames:
      - {{ .Values.namespace }}
  selector:
    matchLabels:
      {{ include "diagnosis-query.labels" . | nindent 6 }}
