Mohammed Naser | 65cda13 | 2024-05-02 14:34:08 -0400 | [diff] [blame] | 1 | {{- if .Values.prometheus.enable }} |
| 2 | # Prometheus Monitor Service (Metrics) |
| 3 | apiVersion: monitoring.coreos.com/v1 |
| 4 | kind: PodMonitor |
| 5 | metadata: |
| 6 | name: {{ include "node-feature-discovery.fullname" . }} |
| 7 | labels: |
| 8 | {{- include "node-feature-discovery.selectorLabels" . | nindent 4 }} |
| 9 | {{- with .Values.prometheus.labels }} |
| 10 | {{ toYaml . | nindent 4 }} |
| 11 | {{- end }} |
| 12 | spec: |
| 13 | podMetricsEndpoints: |
| 14 | - honorLabels: true |
| 15 | interval: 10s |
| 16 | path: /metrics |
| 17 | port: metrics |
| 18 | scheme: http |
| 19 | namespaceSelector: |
| 20 | matchNames: |
| 21 | - {{ include "node-feature-discovery.namespace" . }} |
| 22 | selector: |
| 23 | matchExpressions: |
| 24 | - {key: app.kubernetes.io/instance, operator: In, values: ["{{ .Release.Name }}"]} |
| 25 | - {key: app.kubernetes.io/name, operator: In, values: ["{{ include "node-feature-discovery.name" . }}"]} |
| 26 | {{- end }} |