Plugins: API sync (#112452)

This commit is contained in:
Todd Treece
2025-10-24 08:09:26 -04:00
committed by GitHub
parent 8b12bbcc55
commit dc77da11cf
25 changed files with 1214 additions and 47 deletions
+6 -7
View File
@@ -10,14 +10,13 @@ import (
"github.com/grafana/grafana-app-sdk/app"
appsdkapiserver "github.com/grafana/grafana-app-sdk/k8s/apiserver"
"github.com/grafana/grafana-app-sdk/simple"
"github.com/grafana/grafana/apps/plugins/pkg/apis"
pluginsappapis "github.com/grafana/grafana/apps/plugins/pkg/apis"
pluginsv0alpha1 "github.com/grafana/grafana/apps/plugins/pkg/apis/plugins/v0alpha1"
pluginsapp "github.com/grafana/grafana/apps/plugins/pkg/app"
"github.com/grafana/grafana/pkg/services/apiserver/appinstaller"
"github.com/grafana/grafana/pkg/services/apiserver/endpoints/request"
"github.com/grafana/grafana/pkg/services/featuremgmt"
"github.com/grafana/grafana/pkg/setting"
pluginsv0alpha1 "github.com/grafana/grafana/apps/plugins/pkg/apis/plugins/v0alpha1"
pluginsapp "github.com/grafana/grafana/apps/plugins/pkg/app"
)
var (
@@ -38,13 +37,13 @@ func RegisterAppInstaller(
cfg: cfg,
}
specificConfig := any(nil)
provider := simple.NewAppProvider(apis.LocalManifest(), specificConfig, pluginsapp.New)
provider := simple.NewAppProvider(pluginsappapis.LocalManifest(), specificConfig, pluginsapp.New)
appConfig := app.Config{
KubeConfig: restclient.Config{}, // this will be overridden by the installer's InitializeApp method
ManifestData: *apis.LocalManifest().ManifestData,
ManifestData: *pluginsappapis.LocalManifest().ManifestData,
SpecificConfig: specificConfig,
}
i, err := appsdkapiserver.NewDefaultAppInstaller(provider, appConfig, &apis.GoTypeAssociator{})
i, err := appsdkapiserver.NewDefaultAppInstaller(provider, appConfig, pluginsappapis.NewGoTypeAssociator())
if err != nil {
return nil, err
}