Skip to content

Unable to reference data source in alert rule #1910

Closed Answered by Baarsgaard
siwyroot asked this question in Q&A
Discussion options

You must be logged in to vote

The GrafanaDatasource CR supports setting the UID.
There's two fields for it, the spec.uid is an immutable alternative to the spec.datasource.uid

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.

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by theSuess
Comment options

You must be logged in to vote
1 reply
@theSuess
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants