# SPDX-License-Identifier: Apache-2.0
# Copyright 2023 The HuggingFace Authors.

{{- if .Values.monitoring.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  labels: {{ include "labels.rows" . | nindent 4 }}
  name: "{{ include "name" . }}-rows"
  namespace: {{ .Release.Namespace }}
spec:
  endpoints:
    - path: /metrics
      port: http
  namespaceSelector:
    matchNames:
      - {{ .Release.Namespace }}
  selector:
    matchLabels: {{ include "labels.rows" . | nindent 6 }}
{{- end }}
