K8s: Make v0alpha1 opt-in (#107056)

This commit is contained in:
Stephanie Hingtgen
2025-06-20 16:37:17 -05:00
committed by GitHub
parent 0e35c8bdb4
commit ef6e28b955
21 changed files with 117 additions and 541 deletions
@@ -17,6 +17,7 @@ import (
"github.com/grafana/grafana/pkg/registry/apps/alerting/notifications/templategroup"
"github.com/grafana/grafana/pkg/registry/apps/alerting/notifications/timeinterval"
"github.com/grafana/grafana/pkg/services/accesscontrol"
"github.com/grafana/grafana/pkg/services/apiserver/builder"
"github.com/grafana/grafana/pkg/services/apiserver/builder/runner"
"github.com/grafana/grafana/pkg/services/apiserver/endpoints/request"
"github.com/grafana/grafana/pkg/services/ngalert"
@@ -37,10 +38,11 @@ func RegisterApp(
return nil
}
appCfg := &runner.AppBuilderConfig{
Authorizer: getAuthorizer(ng.Api.AccessControl),
LegacyStorageGetter: getLegacyStorage(request.GetNamespaceMapper(cfg), ng),
OpenAPIDefGetter: v0alpha1.GetOpenAPIDefinitions,
ManagedKinds: notificationsResource.GetKinds(),
Authorizer: getAuthorizer(ng.Api.AccessControl),
LegacyStorageGetter: getLegacyStorage(request.GetNamespaceMapper(cfg), ng),
OpenAPIDefGetter: v0alpha1.GetOpenAPIDefinitions,
ManagedKinds: notificationsResource.GetKinds(),
AllowedV0Alpha1Resources: []string{builder.AllResourcesAllowed},
}
return &AlertingNotificationsAppProvider{