Unable to reference data source in alert rule #1910
-
Hello, I'm trying to deploy GrafanaAlertRuleGroup with operator but when I set
Datasource
Alert Rule Group
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
The apiVersion: grafana.integreatly.org/v1beta1
kind: GrafanaDatasource
metadata:
name: ocp-cluster
spec:
uid: ocp-cluster # Overwrites spec.datasource.uid but is immutable.
datasource:
name: ocp-cluster
uid: ocp-cluster # This is mutable. I personally prefer to statically define UIDs to ensure the exact same resource is created every time. |
Beta Was this translation helpful? Give feedback.
-
@Baarsgaard Thanks for that info, I will try it out. On the other hand I could not find in examples this approche (should this be a best practice?) . Dashboard can reference data source by :
Should |
Beta Was this translation helpful? Give feedback.
-
Thanks for explanation and solution! |
Beta Was this translation helpful? Give feedback.
The
GrafanaDatasource
CR supports setting the UID.There's two fields for it, the
spec.uid
is an immutable alternative to thespec.datasource.uid
I personally prefer to statically define UIDs to ensure the exact same resource is created every time.