Alerting: Return default builtin templates in k8s templategroup API and UI (#96330)

* Alerting: PoC - default template in k8s templategroup API

* Move code to grafana/alerting

* Move validation to admission validation abstraction

* Testing

* Linting

* Workspace update

* Update grafana/alerting hash to the merged commit

* More user-friendly name and remove need for CREATE/UPDATE validation

Use __default__ for k8s object name and UID so that we don't need to restrict
CREATE/UPDATE for similarly named user-owned templates.
This commit is contained in:
Matthew Jacobson
2025-01-10 19:53:18 -05:00
committed by GitHub
parent 0029f92ac3
commit ad1417b732
10 changed files with 114 additions and 16 deletions
@@ -7,6 +7,8 @@ import (
"github.com/grafana/grafana/apps/alerting/common"
)
const DefaultTemplateTitle = "Built-in Templates"
func (o *TemplateGroup) GetProvenanceStatus() string {
if o == nil || o.Annotations == nil {
return ""