Mohammed Naser | 8a2c8fb | 2023-02-19 17:23:55 +0000 | [diff] [blame] | 1 | {{- if .Values.monitoring.serviceMonitor.enabled }} |
| 2 | {{- with .Values.monitoring.serviceMonitor.metricsInstance }} |
| 3 | {{- if and ($.Capabilities.APIVersions.Has "monitoring.grafana.com/v1alpha1/MetricsInstance") .enabled }} |
| 4 | apiVersion: monitoring.grafana.com/v1alpha1 |
| 5 | kind: MetricsInstance |
| 6 | metadata: |
| 7 | name: {{ include "loki.fullname" $ }} |
| 8 | {{- with .annotations }} |
| 9 | annotations: |
| 10 | {{- toYaml . | nindent 4 }} |
| 11 | {{- end }} |
| 12 | labels: |
| 13 | {{- include "loki.labels" $ | nindent 4 }} |
| 14 | {{- with .labels }} |
| 15 | {{- toYaml . | nindent 4 }} |
| 16 | {{- end }} |
| 17 | spec: |
| 18 | {{- with .remoteWrite}} |
| 19 | remoteWrite: |
| 20 | {{- toYaml . | nindent 4 }} |
| 21 | {{- end }} |
| 22 | |
| 23 | serviceMonitorNamespaceSelector: {} |
| 24 | |
| 25 | serviceMonitorSelector: |
| 26 | matchLabels: |
| 27 | {{- include "loki.selectorLabels" $ | nindent 6 }} |
| 28 | {{- end -}} |
| 29 | {{- end -}} |
| 30 | {{- end -}} |