{{- if and .Values.prometheus.enabled .Values.prometheus.additionalServiceMonitors }} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: service-monitor-collectd namespace: {{ $.Release.Namespace | quote }} labels: app: {{ template "prometheus-operator.name" $ }}-prometheus {{ include "prometheus-operator.labels" $ | indent 8 }} collector: collectd spec: endpoints: - interval : 10s path: /metrics port: collectd-prometheus jobLabel: collectd selector: matchLabels: app: collectd {{- end }}