mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-21 20:23:39 +09:00
The default variant deploys monitoring to the cozy-monitoring namespace, but the infra dashboards condition only checked for tenant-root. This adds cozy-monitoring to the condition, consistent with the existing pattern in vmagent.yaml. Fixes cozystack/cozystack#2349 Signed-off-by: mattia-eleuteri <mattia@hidora.io>
35 lines
958 B
YAML
35 lines
958 B
YAML
{{- range (split "\n" (.Files.Get "dashboards.list")) }}
|
|
{{- $parts := split "/" . }}
|
|
{{- if eq (len $parts) 2 }}
|
|
---
|
|
apiVersion: grafana.integreatly.org/v1beta1
|
|
kind: GrafanaDashboard
|
|
metadata:
|
|
name: {{ $parts._0 }}-{{ $parts._1 }}
|
|
spec:
|
|
folder: {{ $parts._0 }}
|
|
instanceSelector:
|
|
matchLabels:
|
|
dashboards: grafana
|
|
url: http://grafana-dashboards.cozy-grafana-operator.svc/{{ . }}.json
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if or (eq .Release.Namespace "tenant-root") (eq .Release.Namespace "cozy-monitoring") }}
|
|
{{- range (split "\n" (.Files.Get "dashboards-infra.list")) }}
|
|
{{- $parts := split "/" . }}
|
|
{{- if eq (len $parts) 2 }}
|
|
---
|
|
apiVersion: grafana.integreatly.org/v1beta1
|
|
kind: GrafanaDashboard
|
|
metadata:
|
|
name: {{ $parts._0 }}-{{ $parts._1 }}
|
|
spec:
|
|
folder: {{ $parts._0 }}
|
|
instanceSelector:
|
|
matchLabels:
|
|
dashboards: grafana
|
|
url: http://grafana-dashboards.cozy-grafana-operator.svc/{{ . }}.json
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|