grafana-operator
grafana-operator copied to clipboard
Add an option to disable editing alert rules declared by GrafanaAlertRuleGroup resource
Is your feature request related to a problem? Please describe.
We used GrafanaAlertRuleGroup CR to manage alert rules, but the rules created can be edited by users from UI, which may make the status inconsistency.
Describe the solution you'd like Add an option to disable editing alert rules from UI.
cc @theSuess
Thanks for reporting this issue! We are currently focused on the UID refactoring so we won't have time for this soon but are more than happy to review/accept a PR regarding this.
Should be pretty straight forward:
- Add the field to the api spec
- Set the value of the provenance field accordingly https://github.com/grafana/grafana-operator/blob/5851fe416c91432412bee6c86de9515c90148cb1/controllers/grafanaalertrulegroup_controller.go#L227
@theSuess Thanks, I can work on it
We are currently focused on the UID refactoring
BTW, are you referring to the issue that users must set UID in the CR definition? Previously I assumed the grafana backend can generate those uids
Raised a PR: https://github.com/grafana/grafana-operator/pull/1715
We are currently focused on the UID refactoring
BTW, are you referring to the issue that users must set UID in the CR definition? Previously I assumed the grafana backend can generate those uids
Hi @theSuess , I checked the documentation of provisioning http API: https://grafana.com/docs/grafana/latest/alerting/set-up/provision-alerting-resources/http-api-provisioning/#span-idprovisioned-alert-rulespan-provisionedalertrule, seems that the UID of alert rule is not a REQUIRED field.
Is it possible to omit the uid when declaring CR ?
Is it possible to omit the uid when declaring CR? Currently, we need the UID to compute the delta. If there is another way, I'm all for it
Closing this as #1715 has been merged