* WIP implement generic compare interface
* Use global compare fn for all entities
* Lint
* Update pkg/apiserver/rest/dualwriter.go
Co-authored-by: Dan Cech <dcech@grafana.com>
* Don't need to hash, just compare bytes
* Fix tests
---------
Co-authored-by: Dan Cech <dcech@grafana.com>
* expose ngalert API to public
* add delete action to time-intervals
* introduce time-interval model generated by app-platform-sdk from CUE model the fields of the model are chosen to be compatible with the current model
* implement api server
* add feature flag alertingApiServer
---- Test Infra
* update helper to support creating custom users with enterprise permissions
* add generator for Interval model
* Pass prometheus registerer to the dual writer
* Fix tests
* Remove unused var
* Fix tests
* Uncomment test
* Remove leading line
* Fix tests. Reuse registerer if there's already one
* Lint
* Improve double registering logic
* Rebase main
- Adds a find endpoint to return dashboard bindings that match any of the scopes. For example /apis/scope.grafana.app/v0alpha1/namespaces/default/find/scope_dashboard_bindings?scope=s1&scope=s2
- Updates the ScopeNode find endpoint to a new path, /find/scope_node_children , makes the key "items" for all find endpoints (instead of mix of "found" and "items"), and makes the list item type a ScopeNode instead of its own type.
- Updates kubectl get commands to return more information about scopes, scopenodes, and scopedashboard bindings to display more fields in table output
---------
Signed-off-by: bergquist <carl.bergquist@gmail.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Kyle Brandt <kyle@grafana.com>
Co-authored-by: Todd Treece <todd.treece@grafana.com>
* Add skeleton implementation for mode reconciliation between 1 and 2
* Track mode for each dual writer
* Add test for setting dual writer
* Include context when setting dual writing mode
---------
Co-authored-by: Dan Cech <dcech@grafana.com>
* Add feature toggles for mode 2 and 3 playlist dual writing
* Make current mode customised based on kind
* Check feature flags when initialising dual writer
* Fix linting
* Refactor NewDualWriter
* Fix mode 2 List test
* Set origin timestamp during conversion to k8s resource
* Add instructions for updating a playlist
* Handle partial deletions of a collection in mode 2
* Feature Flags: use FeatureToggles interface where possible
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
* Replace TestFeatureToggles with existing WithFeatures
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
---------
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>