Cross namespace
If you want your resources synced to a grafana instance outside their namespace you need to set .spec.allowCrossNamespaceImport: true
.
In the resources file you will find examples how to do this.
apiVersion: v1
kind: Namespace
metadata:
name: grafana-a
---
apiVersion: v1
kind: Namespace
metadata:
name: grafana-b
---
apiVersion: grafana.integreatly.org/v1beta1
kind: Grafana
metadata:
name: grafana
namespace: grafana-a
labels:
dashboards: "grafana"
spec:
config:
log:
mode: "console"
security:
admin_user: root
admin_password: secret
---
apiVersion: grafana.integreatly.org/v1beta1
kind: GrafanaDatasource
metadata:
name: example-grafanadatasource
namespace: grafana-b
spec:
allowCrossNamespaceImport: true
datasource:
access: proxy
database: prometheus
jsonData:
timeInterval: 5s
tlsSkipVerify: true
name: Prometheus
url: http://prometheus-service:9090
instanceSelector:
matchLabels:
dashboards: grafana