K8s: Add basic query service (#80325)
This commit is contained in:
@@ -14,6 +14,8 @@ import (
|
||||
|
||||
"github.com/grafana/grafana/pkg/registry/apis/example"
|
||||
"github.com/grafana/grafana/pkg/registry/apis/featuretoggle"
|
||||
"github.com/grafana/grafana/pkg/registry/apis/query"
|
||||
"github.com/grafana/grafana/pkg/registry/apis/query/runner"
|
||||
"github.com/grafana/grafana/pkg/server"
|
||||
"github.com/grafana/grafana/pkg/services/featuremgmt"
|
||||
grafanaAPIServer "github.com/grafana/grafana/pkg/services/grafana-apiserver"
|
||||
@@ -50,6 +52,13 @@ func (o *APIServerOptions) loadAPIGroupBuilders(args []string) error {
|
||||
// No dependencies for testing
|
||||
case "example.grafana.app":
|
||||
o.builders = append(o.builders, example.NewTestingAPIBuilder())
|
||||
// Only works with testdata
|
||||
case "query.grafana.app":
|
||||
o.builders = append(o.builders, query.NewQueryAPIBuilder(
|
||||
featuremgmt.WithFeatures(),
|
||||
runner.NewDummyTestRunner(),
|
||||
runner.NewDummyRegistry(),
|
||||
))
|
||||
case "featuretoggle.grafana.app":
|
||||
features := featuremgmt.WithFeatureManager(setting.FeatureMgmtSettings{}, nil) // none... for now
|
||||
o.builders = append(o.builders, featuretoggle.NewFeatureFlagAPIBuilder(features))
|
||||
|
||||
Reference in New Issue
Block a user