7 Commits

Author SHA1 Message Date
e4a1243948 Alerting: Consume k8s API for notification policies tree (#96147)
* Add basic usage of K8s API for notification policies

* Add permissions checks for navtree for routes

* Add and update permissions for routing tree logic

* Add capability to skip calling contact points hook

* Conditionally show list of mute timings depending on permissions

* Conditionally link to mute timings if user can see at least one

* Add work in progress k8s handlers for routing tree

* Update notification policy hooks

* Wire up policies to permissions better (conditionally calling APIs)

* Add additional checks for whether to show grafana AM

* Add permission checks to access control

* Remove accidental permissions after rebase

* Update types and const for k8s routes

* Improve statefulness and reset routing tree in tests

* Update notif policy tests to check k8s and config API

* Fix type assertion

* Move non-grafana test out of .each

* Make failure case safer

* Override tag invalidation for notification policies API

* Pass in error and add new error alert component

* Add basic mock server conflict check

* Add test to check user can save after a conflict

* Add logic to allow reloading policies if changed by another user

* Fix test

* Update translations in Modals

* Add ViewAlertGroups ability

* Tweak provisioning logic and memoize AM config response

* Update snapshots for useAbilities

* Update result destructure

* Use enums for provenance in routingtrees

* Use consistent memoisation

* Fix _metadata for vanilla AM

* useAsync for error / update state

* move k8s api error handling to separate file

* use cause for error codes

* Use `supported` bools from Alertmanager abilities and clarify default policy

---------

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2024-11-26 13:46:39 +00:00
9fff736549 Alerting: Support k8s templates API (#92112)
Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2024-10-02 17:14:54 +02:00
690fbe6077 Alerting: Edit, create and delete contact points via k8s API (#91701) 2024-08-30 12:10:30 +01:00
e2a1d59a96 Alerting: Remove disable logic for name field on time intervals when using k8s API (#91885)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2024-08-19 14:53:12 +01:00
17067824fb Alerting: Conditionally use k8s API for simplified routing contact points selector (#90901) 2024-08-01 14:41:40 +01:00
6c64d1d443 Alerting: Consume k8s Time Intervals API (#90094) 2024-07-31 16:59:15 +03:00
b18b1efec4 Alerting: Add (manual) script to generate alerting RTKQ APIs from OpenAPI spec (#89482) 2024-07-02 18:31:37 +01:00