Commit Graph
655 Commits
Author SHA1 Message Date
Ryan McKinley e2eeba7bb4 resolve conflicts 2025-01-13 09:04:41 +03:00
Matthew Jacobson ad1417b732 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.
2025-01-10 19:53:18 -05:00
Ryan McKinley d165a0851b merge main + fix lint 2025-01-09 14:12:17 +03:00
Mariell Hoversholm 0d315b6cbe Merge remote-tracking branch 'origin/main' into grafana-git-ui-sync 2025-01-09 08:28:24 +01:00
Yuri Tseretyan 3e68731600 Alerting: Enable flag alertingApiServer by default (#98282)
* enable flag alertingApiServer by default
* remove feature flag toggle in integration tests
* disable flag for old API tests
2025-01-08 14:31:35 -05:00
Alex Khomenko c0a0c7bb3d POC/Provisioning: Use PUT endpoints for updates (#98674) 2025-01-08 18:46:15 +03:00
Mariell Hoversholm 2763efba12 Merge remote-tracking branch 'origin/main' into grafana-git-ui-sync 2025-01-08 15:11:13 +01:00
Ryan McKinleyandMariell Hoversholm d0caf1135b POC/Provisioning: Update webhook test and constant (#98669)
* chore: regen openapi spec

* test: fix existing tests

* chore: pushing for Matheus

* test: ensure GH repository syncs successfully

* chore: ptr is not necessary

* chore: delete unnecessary function

* fix: use assert in require.Eventually blocks

* update webhook test

* fix: ensure deleting works

---------

Co-authored-by: Mariell Hoversholm <mariell.hoversholm@grafana.com>
2025-01-08 15:01:55 +01:00
Mariell Hoversholm 654387e357 POC/Provisioning: Test happy-path syncing with GitHub (#98663)
* chore: regen openapi spec

* test: fix existing tests

* chore: pushing for Matheus

* test: ensure GH repository syncs successfully

* chore: ptr is not necessary

* chore: delete unnecessary function

* fix: use assert in require.Eventually blocks
2025-01-08 14:48:43 +01:00
Stephanie Hingtgen 5ed2a4c624 K8s: Dashboards: Add deletion validation for provisioned dashboards (#98504) 2025-01-08 06:58:21 -06:00
Mariell Hoversholm f0aed104fb Merge remote-tracking branch 'origin/main' into grafana-git-ui-sync 2025-01-08 11:22:26 +01:00
Moustafa Baiou 25538bcfdf Alerting: Fix label escaping in rule export (#97985) 2025-01-07 17:09:27 -05:00
Ryan McKinley bd0f148110 Merge remote-tracking branch 'origin/main' into grafana-git-ui-sync 2025-01-07 13:46:31 +03:00
Ryan McKinley f97fa5e5e9 Provisioning: Update OpenAPI and k8s codegen (#98568)
* revert folder changes

* update snapshots

* openapi cleanup

* update codegen
2025-01-07 13:43:19 +03:00
Ryan McKinley b506fcb11c K8s: Fix the gitVersion response (required for kubectl) (#98571) 2025-01-07 11:43:19 +02:00
Ryan McKinley c9701c37bf merge main 2024-12-21 11:32:17 +03:00
1a46039037 K8s/Dashboards: Pass the legacy internal ID into labels (#98311)
---------

Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2024-12-20 21:33:49 +02:00
owensmallwood 4837585cab Unified Storage Search: Add sprinkles (#97820)
* Wire up sprinkles to oss and enterprise. Fetching sprinkles not implemented yet.

* Adds wireset for initializing document builders. Had to init it when creating the service to avoid cyclical imports.

* updates to int64 for stats

* adds config for sprinklesApiServer and gets sprinkles from there when its present

* add comment for later

* adds feature toggle for sprinkles. returns empty results when flag not enabled.

* adds unified storage config setting for sprinkles apiserver page limit

* fixes bug where dashboard uid was not getting set

* when creating dashboard summary, use metadata.name as the dashboard uid

* cleans up wire. use existing oss and enterprise sets to generate doc builders

* remove old wireset

* fix linter - adds missing arg for doc builders

* update dashboard stats in tests

* updates test-data dashboards

* log a warning instead of returning an error if we can't get sprinkles for a namespace

* dont read uid from dashboard json
2024-12-18 11:00:54 -06:00
Ryan McKinley f0dc718a67 POC/Provisioning: Use cards layout to show more status info (#98155) 2024-12-18 12:37:45 +03:00
Ryan McKinley b322f65243 Merge remote-tracking branch 'origin/main' into grafana-git-ui-sync 2024-12-18 08:39:03 +03:00
Adam Simpson 57d94ed01f ds-querier: return error if failed to get ds client (#97698)
* ds-querier: return error if failed to get ds client

* add log line

* no empty ref

* fix test
2024-12-17 10:38:44 -05:00
Mariell Hoversholm 0ad2f2ac47 Merge remote-tracking branch 'origin/main' into grafana-git-ui-sync 2024-12-17 15:11:35 +01:00
Ryan McKinley a01878332a K8s/Storage: Deprecate StorageTypeLegacy (#98096) 2024-12-17 17:00:35 +03:00
Ryan McKinley bb20d128f0 POC/Provisioning: Minor cleanups (#98089) 2024-12-17 16:27:40 +03:00
Ryan McKinleyandMariell Hoversholm 4e90c34b64 POC/Provisioning: Use healthy repositories (#97999)
Co-authored-by: Mariell Hoversholm <mariell.hoversholm@grafana.com>
2024-12-17 11:13:30 +03:00
Ryan McKinley efc0b6802f fix test 2024-12-17 09:30:41 +03:00
Ryan McKinley 751b11b5bd fix test 2024-12-17 08:00:55 +03:00
Ryan McKinley a75c39bfe7 merge main 2024-12-16 19:14:52 +03:00
Ryan McKinley e4837d452e Merge remote-tracking branch 'origin/main' into grafana-git-ui-sync 2024-12-16 19:07:54 +03:00
Alex KhomenkoandRyan McKinley dfb7d5110e POC/Provisioning: update generator (#98027)
* Add source

* Update filters

* Exclude all namespace endpoints

* Remove watch endpoints

* Exclude collection endpoint

* Update arg names

* Add parser script

* Update spec

* Update @rtk-query/codegen-openapi

* Update params for list endpoints

* Use new hooks and types in hooks

* alternative operation ID

* alternative operation ID

* alt operation

* alt operation

* Move some transformations to BE

* Update endpoints

* Update types after generation

* Remove spec and generated endpoints

* Add tags automatically

* Update pkg/services/apiserver/builder/helper.go

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* add static openapi

* Use generated spec

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2024-12-16 16:27:31 +02:00
Todd TreeceandRyan McKinley 8b0cd9dbb9 K8s: Increment generation in generic strategy (#97946)
---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2024-12-16 08:18:43 -05:00
Leonor OliveiraandBruno Abrantes 62c1735a61 Implement k8s count handler (#97955)
* Implement k8s count handler

* Fix endpoint

* Fix type converstions

* Add tests for foldercounts

* Add more tests

* Only use sql-fallback if no values in unistore

* Update gomod

* Fix test

* Update pkg/api/folder_test.go

Co-authored-by: Bruno Abrantes <bruno.abrantes@grafana.com>

* Go.mod

---------

Co-authored-by: Bruno Abrantes <bruno.abrantes@grafana.com>
2024-12-16 14:08:29 +01:00
Ryan McKinley 2f4f727758 POC/Provisioning: Add id mapping utility (#97997) 2024-12-16 14:42:31 +03:00
Mariell Hoversholm 37456b7747 test: correct returned type from export endpoint 2024-12-16 08:54:06 +01:00
Ryan McKinley 1689c51b0d POC/Provisioning: Replace the /import endpoint with /sync (#97933) 2024-12-13 16:04:01 +03:00
Ryan McKinleyandTodd Treece de2bff1d07 POC/Provisioning: Add informer (with healthcheck) (#97806)
Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2024-12-13 13:45:22 +03:00
Mariell Hoversholm 4127741ea8 POC/Provisioning: Local repo: Test importing a panel (#97900) 2024-12-13 08:59:05 +01:00
Mariell Hoversholm 708c6ca800 fix: reintroduce removed code 2024-12-12 16:33:38 +01:00
Ryan McKinley d57c2078e5 merge main 2024-12-12 18:04:02 +03:00
Mariell Hoversholm e6a6fc6f74 Tests: Require GrafanaOpts when creating Grafana dir (#97825)
I don't see a reason to accept a variable amount here, as we never use it. The only use I can see is optionally
including the opts, which isn't necessary and only complicates matters when an empty struct would do just as well: the
options are all created to be assumed zero-values already, in case a test doesn't need that option set.
2024-12-12 15:13:06 +01:00
Mariell Hoversholm f62ab80430 test: set permitted provisioning paths 2024-12-12 13:16:39 +01:00
Mariell Hoversholm e5f43521a4 POC/Provisioning: Allow specific local path prefixes (#97822) 2024-12-12 10:38:41 +01:00
Mariell Hoversholm 22e0e952c7 Merge remote-tracking branch 'origin/main' into grafana-git-ui-sync 2024-12-11 12:15:47 +01:00
Mariell Hoversholm 1974f9c583 POC/Provisioning: Use forward-slashes everywhere (#97740)
* POC/Provisioning: Create utility for joining paths safely

* POC/Provisioning: Clarify ./ prefixes

* POC/Provisioning: Apply safe path rules

* POC/Provisioning: Linter: Fix comment

* POC/Provisioning: Test: Ensure invalid paths fail
2024-12-11 12:13:27 +01:00
Stephanie Hingtgen b05d60e5b5 k8s: dashboards: remove FT (#97758) 2024-12-10 12:35:36 -06:00
Ryan McKinleyandRoberto Jimenez Sanchez d33424e265 POC/Provisioning: Support test method for repository configuration (#97485)
* add test method

* support new

* show test failure in the UI

* update betterer

* fix lint/test

* merge

* merge

* frontend more cleanup

* move common validation functions

* cleanup

* Add github repository tests

---------

Co-authored-by: Roberto Jimenez Sanchez <roberto.jimenez@grafana.com>
2024-12-10 16:03:20 +01:00
Ryan McKinley ef5dacd289 POC/Provisioning: Add multiple commits to one job w/ Watch (#97716) 2024-12-10 13:10:34 +03:00
Matheus Macabu dd969f8a54 Chore: Attempt to reduce flakiness in integration tests (#97247)
* sqlstore/sqlutil: set sync=OFF for sqlite in tests if wal=true

* testinfra: set max open/idle conn to 2 to match e2e tests
2024-12-10 10:55:18 +01:00
Mariell Hoversholm 76a265ce3e POC/Provisioning: Remove hello world resource (#97717)
It feels like it's time to get rid of this. It has been useful for testing, but ultimately replaced by proper
subresources in their own paths and files.
2024-12-10 08:54:23 +01:00
Ryan McKinley 06a3297669 merge magin 2024-12-10 08:09:36 +03:00