Skip to content

Commit 07bd24c

Browse files
committed
fix(k8s/magiclove/grafana): node exporter dashboard
1 parent dc3ee0c commit 07bd24c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

k8s/magiclove/grafana/grafana_dashboard_list.cue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package grafana
33
import (
44
"crypto/sha256"
55
"encoding/hex"
6+
"list"
67

78
grafanav1beta1 "github.com/grafana/grafana-operator/v5/api/v1beta1"
89
)
@@ -100,10 +101,10 @@ let dashboards = {
100101
}
101102
instanceSelector: matchLabels: "app.kubernetes.io/name": #Name
102103
folder: folderName
103-
datasources: [if folder == "EMQX MQTT" {
104-
inputName: "prometheus"
105-
datasourceName: "default"
106-
}, if "\(dashboardRef)" == "17446" {
104+
105+
let datasourceDashboards = [1860, 17446]
106+
107+
datasources: [if list.Contains(datasourceDashboards, dashboardRef) {
107108
inputName: "DS_PROMETHEUS"
108109
datasourceName: "default"
109110
}]

0 commit comments

Comments
 (0)