Provisioning: add webhook support in API Server and Operator (#110673)

* Provisioning: add webhook support in API Server

* updating Extra interface

* adding extra with workers interface

* reverting extraWithWorkers in RegisterAPIService

* adding extra job worker provider

* adding new extra job provider

* Wire things differently

* Remove unused GetJobs

* Pass url variable as string

* Support webhooks in controller

* Fix condition

* Change the naming

---------

Co-authored-by: Roberto Jimenez Sanchez <roberto.jimenez@grafana.com>
This commit is contained in:
Daniele Stefano Ferru
2025-09-08 19:39:05 +02:00
committed by GitHub
co-authored by Roberto Jimenez Sanchez
parent 32e997d282
commit 76976ef648
10 changed files with 144 additions and 38 deletions
-2
View File
@@ -3,7 +3,6 @@ package provisioning
import (
"context"
"github.com/grafana/grafana/pkg/registry/apis/provisioning/jobs"
"k8s.io/apiserver/pkg/authorization/authorizer"
"k8s.io/apiserver/pkg/registry/rest"
"k8s.io/kube-openapi/pkg/spec3"
@@ -13,7 +12,6 @@ type Extra interface {
Authorize(ctx context.Context, a authorizer.Attributes) (decision authorizer.Decision, reason string, err error)
UpdateStorage(storage map[string]rest.Storage) error
PostProcessOpenAPI(oas *spec3.OpenAPI) error
GetJobWorkers() []jobs.Worker
}
type ExtraBuilder func(b *APIBuilder) Extra