grafana / grafana-operator

An operator for Grafana that installs and manages Grafana instances, Dashboards and Datasources through Kubernetes/OpenShift CRs
https://grafana.github.io/grafana-operator/
Apache License 2.0
919 stars 397 forks source link

Feature: provision notificationTemplates trough the operator #1736

Open Marb0l opened 2 weeks ago

Marb0l commented 2 weeks ago

Is your feature request related to a problem? Please describe. We want to provision all the configurations trough the operator but notificationTemplates are missing, i think it would be useful to add them as they can be shared trough grafana instances and in case of a redeploy they have to be added again manually

Baarsgaard commented 2 weeks ago

If you want to provision templates today, you can configure it per GrafanaContactPoint if it has a field that supports templating:

 settings:
    message: |
      {{ .CommonLabels.alertname }} {{ .CommonLabels.namespace }}

If you provision this through Helm, you can wrap the template to avoid Helm templating errors

 settings:
    message: |
      {{` {{ .CommonLabels.alertname }} {{ .CommonLabels.namespace }} `}}
theSuess commented 2 weeks ago

Thanks for the issue! It is certainly a valid feature request and should be straight forward to implement. As this is the first time this has been requested, we're not prioritizing it super high, but it should be implemented eventually. That being said, this looks like a good first issue to start out on as the resource is very small and doesn't have any dependencies

chenlujjj commented 4 hours ago

I need this feature, I think I can work on it.
Hi @theSuess , can you assign it to me if possible?