From b6567e5abc821d5ed0b9dbad6cd94f695d0bc7ad Mon Sep 17 00:00:00 2001 From: Stephanie Hingtgen Date: Thu, 11 Sep 2025 13:46:00 -0600 Subject: [PATCH] Folders: Fix deletion in api server (#110984) --- pkg/registry/apis/folders/register.go | 4 ++-- pkg/services/apiserver/options/storage.go | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/registry/apis/folders/register.go b/pkg/registry/apis/folders/register.go index 0c606990fde..b07ce13b90b 100644 --- a/pkg/registry/apis/folders/register.go +++ b/pkg/registry/apis/folders/register.go @@ -91,13 +91,13 @@ func RegisterAPIService(cfg *setting.Cfg, return builder } -func NewAPIService(ac authlib.AccessClient) *FolderAPIBuilder { +func NewAPIService(ac authlib.AccessClient, searcher resource.ResourceClient) *FolderAPIBuilder { return &FolderAPIBuilder{ authorizer: newMultiTenantAuthorizer(ac), + searcher: searcher, ignoreLegacy: true, } } - func (b *FolderAPIBuilder) GetGroupVersion() schema.GroupVersion { return resourceInfo.GroupVersion() } diff --git a/pkg/services/apiserver/options/storage.go b/pkg/services/apiserver/options/storage.go index f692c40b293..e6979e05ee1 100644 --- a/pkg/services/apiserver/options/storage.go +++ b/pkg/services/apiserver/options/storage.go @@ -98,6 +98,7 @@ func (o *StorageOptions) AddFlags(fs *pflag.FlagSet) { fs.StringVar((*string)(&o.StorageType), "grafana-apiserver-storage-type", string(o.StorageType), "Storage type") fs.StringVar(&o.DataPath, "grafana-apiserver-storage-path", o.DataPath, "Storage path for file storage") fs.StringVar(&o.Address, "grafana-apiserver-storage-address", o.Address, "Remote grpc address endpoint") + fs.StringVar(&o.SearchServerAddress, "grafana-apiserver-search-address", o.SearchServerAddress, "Remote grpc address endpoint for search server") fs.StringVar(&o.GrpcClientAuthenticationToken, "grpc-client-authentication-token", o.GrpcClientAuthenticationToken, "Token for grpc client authentication") fs.StringVar(&o.GrpcClientAuthenticationTokenExchangeURL, "grpc-client-authentication-token-exchange-url", o.GrpcClientAuthenticationTokenExchangeURL, "Token exchange url for grpc client authentication") fs.StringVar(&o.GrpcClientAuthenticationTokenNamespace, "grpc-client-authentication-token-namespace", o.GrpcClientAuthenticationTokenNamespace, "Token namespace for grpc client authentication")