Previews: create crawler auth setup service (#47349)

* #46968: add `RetrieveServiceAccountIdByName` to serviceaccounts service

* #46968: improve error logging in rendering service

* #46968: add oss crawler account setup

* #46968: fix tests

* #46968: switch back to ROLE_ADMIN

* #46968: rename to crawlerAuth

* comment crawler_auth.go
This commit is contained in:
Artur Wierzbicki
2022-04-12 19:34:04 +02:00
committed by GitHub
parent 5cb5141c72
commit a4381ebc91
11 changed files with 153 additions and 36 deletions
+1 -2
View File
@@ -5,7 +5,6 @@ import (
"time"
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/services/rendering"
)
type CrawlerMode string
@@ -66,7 +65,7 @@ type dashboardPreviewsSetupConfig struct {
type dashRenderer interface {
// Run Assumes you have already authenticated as admin.
Run(ctx context.Context, authOpts rendering.AuthOpts, mode CrawlerMode, theme models.Theme, kind models.ThumbnailKind) error
Run(ctx context.Context, auth CrawlerAuth, mode CrawlerMode, theme models.Theme, kind models.ThumbnailKind) error
// Assumes you have already authenticated as admin.
Stop() (crawlStatus, error)