{{- if .Values.prometheus }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: calico-node
  labels:
    k8s-app: calico-node
    release: metrics
spec:
  jobLabel: k8s-app
  selector:
    matchLabels:
      k8s-app: calico-node
  namespaceSelector:
    matchNames:
      - kube-system
  endpoints:
  - port: metrics
{{- end }}
