{{- if .Values.prometheusScraping.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: {{ include "aws-limits-exporter.fullname" . }}
  labels:
  {{- include "aws-limits-exporter.labels" . | nindent 4 }}
spec:
  selector:
    matchLabels:
      app: aws-limits-exporter
  namespaceSelector:
    matchNames:
      - {{ .Release.Namespace }}
  endpoints:
  - port: http-metrics
    path: /metrics
    interval: "{{ .Values.prometheusScraping.scrapInterval }}"
{{- end }}
